Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I try to access the following from firefox everything works even if I'm not logged in




Connecting to||:80... connected.
HTTP request sent, awaiting response... 400 Bad Request
2012-05-08 01:46:49 ERROR 400: Bad Requ

Why do I get an error message?

share|improve this question

migrated from May 8 '12 at 5:51

This question came from our discussion, support, and feature requests site for professional and enthusiast programmers.

up vote 13 down vote accepted

You'll need to quote that URL.

wget ''
     ^                                                      ^

(And note that the payload is gzip-compressed.)

share|improve this answer
For technical reference, this happens because the & in the URL signifies to the shell to start a new background process and run the code following that. – dunsmoreb May 7 '12 at 22:00

The problem is the & characters in the URL. In most shells, foo & bar means "start running foo in the background while running bar in the foreground". Put quotes around the URL to make sure it gets passed as a single parameter to wget.

share|improve this answer

You must log in to answer this question.