sunmingtao / sample-code

3 stars 4 forks source link

Post request in Firefox development tool gets 400 Bad request #139

Closed sunmingtao closed 4 years ago

sunmingtao commented 4 years ago

Log in as umsrsupport and hit https://beta.ned.gov.au/ned/library/member-library/1/view Edit the contact details Resend the request using the development tool -> Network in Firefox

Get 400 Bad request

sunmingtao commented 4 years ago

Initially thought it was due to the basic authentication, but then I was told it would have returned 400 if it was an authentication issue.

Tested with other libraries and they worked fine. It was a data issue.

The offending data seems to be "lastModifiedBy":"pTestsupport1 "

The space in the value is no ordinary space, but a unicode character "u0xa0"

Why the Firefox is able to send the request normally but not through the development tool remains a mystery.