[wp-trac] [WordPress Trac] #3993: Snoopy Class incompability with lighttpd/1.4.11 (and other httpds?)

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 18 18:15:35 GMT 2007


#3993: Snoopy Class incompability with lighttpd/1.4.11 (and other httpds?)
---------------------+------------------------------------------------------
 Reporter:  hakre    |       Owner:  anonymous  
     Type:  defect   |      Status:  new        
 Priority:  normal   |   Milestone:  2.1.3      
Component:  General  |     Version:  2.1.2      
 Severity:  normal   |    Keywords:  snoopy http
---------------------+------------------------------------------------------
 I had the situation that an RSS request made to a server resultet in a 404
 instead 200. I analyzed it and it came to my attention that using the Port
 within the Host Request header (as snoopy does) triggers that error.

 Since HOST is not a valid http/1.0 (Request) Header(1), (2) applies here.
 Port 80 is the default Port for HTTP(2) it must not be part of the HOST
 Header. Since this is causing the Error with lighttpd/1.4.11 I suggest to
 modify the snoopy class:

 {{{
 file: wp-inludes/class-snoopy.php
 line: 799ff
 change from:
                         if(!empty($this->port))
                                 $headers .= ":".$this->port;

 change to:
                         if(!empty($this->port))
                                 if ($this->port != 80) {
                                         $headers .= ":".$this->port;
                                 }
 }}}

 BTW this type of HTTP Implementation is similar to other stable and mature
 libraries on various platforms.

 (1) see Full-Request in http://www.faqs.org/rfcs/rfc1945.html

 (2) see 14.23 in http://www.faqs.org/rfcs/rfc2616.html

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3993>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list