Skip to content
Tcl Source Code History Of Ticket 504508ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 504508ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 504508ffffffffffffffffffffffffffffffffff

  1. Ticket change [86cb2133b0] (rid 131580) by apulsifer on 2002-01-16 18:15:10:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      http.tcl v2.4 generates a header line in the http 
      request that reads:
      
      Host: www.domain.com:80
      
      I have discovered a server (sorry, can't say where) 
      that tries to 302 redirect you to "www.domain.com" 
      when you request a document from "www.domain.com:80".  
      Yeh, I know its stupid, but since I have no control 
      over the server, the only reasonable work around is to 
      patch http.tcl.
      
      When patched as follows, it works great:
      
      old code:
      puts $s "Host: $host:$port"
      
      new code:
      if {$port == 80} {
      puts $s "Host: $host"
      } else {
      puts $s "Host: $host:$port"
      }
      
      I suggest making this change to http.tcl in order to 
      make it more tolerant of brain damaged servers.
      
      Thanks.
      
      
    4. foundin initialized to: "obsolete: 8.3.4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "apulsifer"
    9. subsystem initialized to: "29. http Package"
    10. title initialized to: "port 80 in "Host:" request header"
    11. type initialized to: "Bug"
  2. Ticket change [b9b19b7eb8] (rid 129193) by hobbs on 2002-01-17 01:23:52:

    1. closedate changed to: "2002-01-16T18:23:52"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      Can you say what the server was?  That seems inane, since 
      the host:port specification is 100% correct with the RFC.  
      I'd register this as a bug against the server, rather than 
      Tcl.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. status changed to: "Pending"
    7. title changed to: "port 80 in "Host:" request header"
    8. username: "hobbs"
  3. Ticket change [931e0a7f61] (rid 105760) by apulsifer on 2002-01-17 01:47:53:

    1. icomment:
      Logged In: YES 
      user_id=429383
      
      I agree, its not a very robust server.  Since the port 
      value in the header is optional, this patch would make the 
      http package more tolerate of bad server code.
      
      BTW, after looking at the RFC, I realize the patch should 
      read (in pseudocode):
      
      if {$port == [default port for the selected protocol]} {
      
      
    2. login: "apulsifer"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. title changed to: "port 80 in "Host:" request header"
    6. username: "apulsifer"
  4. Ticket change [6c892a271d] (rid 128529) by apulsifer on 2002-01-17 02:38:41:

    1. closedate changed to: "2002-01-16T19:38:41"
    2. closer changed to: "apulsifer"
    3. icomment:
      Logged In: YES 
      user_id=429383
      
      I agree, its not a very robust server.  Since the port 
      value in the header is optional, this patch would make the 
      http package more tolerate of bad server code.
      
      BTW, after looking at the RFC, I realize the patch should 
      read (in pseudocode):
      
      if {$port == [default port for the selected protocol]} {
      
      
    4. login: "apulsifer"
    5. mimetype: "text/plain"
    6. status changed to: "Pending"
    7. title changed to: "port 80 in "Host:" request header"
    8. username: "apulsifer"
  5. Ticket change [923b51945d] (rid 120737) by hobbs on 2002-01-25 05:38:56:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      I'd still note this as a server bug, because this might not 
      be a robust patch in Tcl.  https and other support 
      protocols might prevent the above from behaving properly.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. title changed to: "port 80 in "Host:" request header"
    6. username: "hobbs"
  6. Ticket change [f6aac5bebf] (rid 130334) by apulsifer on 2002-01-25 07:39:04:

    1. icomment:
      Logged In: YES 
      user_id=429383
      
      I think it would solve 99% of the problems if you changed 
      it to:
      
      if {$port == 80 && "protocol" == "http"} {
      puts $s "Host: $host"
      } else {
      puts $s "Host: $host:$port"
      }
      
      Note I downgraded to v8.3.2 and it doesn't have this 
      problem.
      
      Thanks,
      
      Allen
      
      
      
    2. login: "apulsifer"
    3. mimetype: "text/plain"
    4. title changed to: "port 80 in "Host:" request header"
    5. username: "apulsifer"
  7. Ticket change [b23745fae5] (rid 98294) by hobbs on 2002-01-25 08:31:53:

    1. closedate changed to: "2002-01-25T01:31:53"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      ok, went with the last solution to that restricts it to 
      http proto, to stay on the safe side.  This is in 8.4a4cvs.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. title changed to: "port 80 in "Host:" request header"
    9. username: "hobbs"
  8. Add attachment "http-port80.txt" [7923693d4c] (rid 90075) by hobbs on 2002-01-25 10:01:08.

  9. Ticket change [c31b25b24f] (rid 111598) by hobbs on 2002-01-25 10:01:08:

    1. closedate changed to: "2002-01-25T03:01:08"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      Found a server that reliably exhibits this bug:
      
      http://www.weather.com/weather/local/24060
      
      From the geturl headers, the server is
         Apache/1.3.12 (Unix) mod_oas/5.1/
      
      This obviously violates the RFC:
      
      http://www.w3.org/Protocols/rfc2616/rfc2616-
      sec14.html#sec14.23
      
      Anyway, I'm back-porting to core-8-3-1-branch in case that 
      ever goes out as well.  I'm also removing the "http" only 
      restriction, because now that I see this happen, I can't 
      rely on broken servers to hopefully server https right 
      either.  I've attached the 8.4a4cvs patch.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. title changed to: "port 80 in "Host:" request header"
    7. username: "hobbs"
  10. Ticket change [4c886ee915] (rid 126907) by hobbs on 2002-01-25 10:01:09:

    1. icomment:
      
      
      File Added - 16729: http-port80.txt
      
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  11. Ticket change [5944396210] (rid 117949) by cleverly on 2002-08-25 09:17:11:

    1. icomment:
      Logged In: YES 
      user_id=22080
      
      Just for the record, PowerDNS that does the redirection for
      wiki.tcl.tk is also brain-dead/broken with regards to:
      "Host: wiki.tcl.tk:80" :-(
      
      
    2. login: "cleverly"
    3. mimetype: "text/plain"
    4. username: "cleverly"