You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@Fujitsu-Siemens.com> on 2001/01/23 15:45:52 UTC

Re: cvs commit: apache-1.3/src/main http_vhost.c

In URL's, the port was optional, as in 

   http://blah.host:/path

Is it guaranteed that the string "blah.host:" is never propagated
into a Host: header?

   Martin

On Tue, Jan 23, 2001 at 02:14:07PM -0000, fanf@apache.org wrote:
>   +        if (*src == ':') {
>   +            /* check the port part */
>   +            while (*++src) {
>   +                if (!ap_isdigit(*src)) {
>   +                    goto bad;
>   +                }
>   +            }
>   +            if (src[-1] == ':')
>   +                goto bad;
>   +            else
>   +                break;
>   +        }
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

Re: cvs commit: apache-1.3/src/main http_vhost.c

Posted by Tony Finch <do...@dotat.at>.
Martin Kraemer <Ma...@Fujitsu-Siemens.com> wrote:
>In URL's, the port was optional, as in 
>
>   http://blah.host:/path

RFC 2616 says:

   http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

       Host = "Host" ":" host [ ":" port ] ; Section 3.2.2

RFC 2396 says:

      hostport      = host [ ":" port ]

Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
" ``Well, let's go down and find out who's grave it is.''
``How?''  ``By going down and finding out!'' "