https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412007-07-06T19:26:47Zlighty labsLighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=30432007-07-06T19:26:47ZAnonymous
<ul></ul><p>Underscore is not a valid character in a hostname. See <a class="external" href="http://tools.ietf.org/html/rfc952">http://tools.ietf.org/html/rfc952</a>.</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=30442007-07-06T19:38:31ZAnonymous
<ul></ul><p>and lighttpd works only with hostname ? the dns accept underscore</p>
<p>take a look on rfc1033</p>
<p><a class="external" href="http://www.faqs.org/rfcs/rfc1033.html">http://www.faqs.org/rfcs/rfc1033.html</a></p>
<pre><code>"A-Z", "a-z", "0-9", dash and underscore</code></pre>
<p>-- itamar</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=30452007-07-09T12:03:06ZAnonymous
<ul></ul><p>Underscore is not an option. RFC 1033 is wrong about this, and it's only some guideline paper, anyway, so there's no relevance here. I'd say that lighty's response 400 is pretty clean and straight forward.</p>
<p>-- anonymous coward</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=30462007-09-18T21:01:45ZAnonymous
<ul></ul><p>i have the same problem with underlines..</p>
<p>-- flycker</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=30472007-09-19T00:27:11Zjrabbit
<ul></ul><p>What is and isn't valid in DNS is completely irrelevant (almost), as is what is and isn't valid on the Internet - who says a server has to be on the Internet or have its name resolved using DNS?</p>
<p>For lighttpd to satisfy the standards regarding hostnames, the only thing it should comply with is the HTTP specification for the host portion of a URI. The HTTP 1.1 specification references RFC 2396 for this, which defines the host portion of an HTTP URI as complying with section 3 of the DNS specification in RFC 1034, which in turn says letters, numbers and hyphen with no label being more than 63 characters and the entire name being no more than 255 characters. Therefore, by this definition "_" is invalid.</p>
<p>However, RFC 2396 was obseleted in 2005 by RFC 3986 which extends the set of characters that are valid in the host portion of a URI to:</p>
<pre>
A-Z / a-z / 0-9 / "-" / "." / "_" / "~" / "!" /
"$" / "&" / "'" / "(" / ")" / "*" / "+" / "," /
";" / "=" and a "%" followed by two hex digits.
</pre>
<p>No updates to HTTP have been published since then, and I'm not sure what the rules are - if RFC A references RFC B which is obseleted by RFC C, does that mean applications conforming to RFC A now must comply with RFC C? If so, "_" should be allowed.</p>
<p>From a practical standpoint, lighttpd can run on a local Windows network and URLs can contain Windows hostnames instead of DNS names, so I think it should be supported.</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=30482007-09-19T08:45:27ZAnonymous
<ul></ul><p>'''This is my case:'''</p>
<p>I use <strong>willcard dns record</strong> to all my subdomains. I have a free forum creating site, and the users can put "_" in theirs forum name, who will be the name of subdomain. (my_forum.mysite.com)<br />Maybe its my fault to allowed that.. but it's works.<br />With apache works too.. i thinking on change to "-", but i have a loot of subdomains in this case and more then 20 billions pageviews per month. It will be a loot of trouble to change..<br />Its a practical case, and i cannot use lighty because this.. falling back to apache.</p>
<p>Examples:<br /><pre>
http:// gg_lunaticos dot queroumforum dot com
http:// escorts_pt dot queroumforum dot com
http:// dj_victor_x_forum dot iwannaforum dot com
</pre></p>
<p>Thanks and sorry for bad english.</p>
<p>-- tiagofischer</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=30492007-09-28T13:47:14ZAnonymous
<ul></ul><p>Can you show me where i need to change this in the source?<br />I wondering to change this before compile.. then i can use!</p>
<p>Thanks</p>
<p>-- flycker</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=30502007-10-01T14:17:57ZAnonymous
<ul></ul><p>It's not the best solution.. but its work to fix my problem:</p>
<p>Examples:</p>
<pre>
http:// gg_lunaticos .queroumforum.com
http:// _teste .queroumforum.com
http:// teste2_ .queroumforum.com
http:// +teste_++teste_+teste__ .queroumforum.com [[[BR]]]
</pre>
<p>Diff:</p>
<pre>
106c106
< if (!light_isalpha(host->ptr[i+1])) {
---
> if (!light_isalpha(host->ptr[i+1]) && '_' != host->ptr[i+1]) {
128c128
< if (!light_isalpha(c)) {
---
> if (!light_isalpha(c) && '_' != c) {
133c133
< if (c != '-' && !light_isalnum(c)) {
---
> if (c != '_' && c != '-' && !light_isalnum(c)) {
171c171
< if (!light_isalnum(c)) {
---
> if (!light_isalnum(c) && c != '_') {
176c176
< if (c != '-' && !light_isalnum(c)) {
---
> if (c != '_' && c != '-' && !light_isalnum(c)) {
</pre> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=63862009-10-07T12:48:41ZElfe
<ul></ul><p>any chance to get this fix into a 1.4.x release?</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=66192009-12-09T17:35:37Zafinlr
<ul></ul><p>I'd like to put in my request for this fix too please.</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=99442016-07-06T06:10:35Zgstrauss
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/9944/diff?detail_id=8276">diff</a>)</li><li><strong>Assignee</strong> deleted (<del><i>jan</i></del>)</li><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li><li><strong>Missing in 1.5.x</strong> set to <i>Yes</i></li></ul><p>lighttpd 1.4.40 provides config option <code>server.http-parseopt-host-strict = "disable"</code> to allow this.</p> Lighttpd - Bug #1253: underline in http address causes a 400 - Bad Request error example http://my_web.com.brhttps://redmine.lighttpd.net/issues/1253?journal_id=101292016-07-16T12:38:55Zgstrauss
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Obsolete</i></li></ul>