title: Are square brackets permitted in URLs?
body: <p>Are square brackets in URLs allowed?</p>
  
  <p>I noticed that <a href="http://hc.apache.org/httpclient-3.x/index.html" rel="noreferrer">Apache commons HttpClient</a> (3.0.1) throws an IOException, wget and Firefox however accept square brackets.</p>
  
  <p>URL example:</p>
  
  <pre><code>http://example.com/path/to/file[3].html
  </code></pre>
  
  <p>My HTTP client encounters such URLs but I'm not sure whether to patch the code or to throw an exception (as it actually should be).</p>