Thursday, January 14, 2016

CURL , HTTP status code 404 - due to whitespaces

Always make sure your CURL requests are using a properly URL encoded address.

Otherwise, any whitespace will break your URL, and you will get ERROR 404 back.

This problem can be confirmed if you look in the body of 404 message. It will state that the file was not found, and you will see that the filename in the body is not the same as one you intended to receieve.

Check the similar issue with nginx 404 - due to automatic decoding of image urls.

No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...