Wireshark-bugs: [Wireshark-bugs] [Bug 5181] New: Wireshark doesn't handle empty URIs in HTTP

Date: Sun, 5 Sep 2010 04:03:58 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5181

           Summary: Wireshark doesn't handle empty URIs in HTTP
           Product: Wireshark
           Version: 1.2.7
          Platform: x86-64
        OS/Version: Windows 7
            Status: NEW
          Severity: Minor
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: boaz.brickner@xxxxxxxxx


Created an attachment (id=5122)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=5122)
A packet example pcap file with the descripted problem

Build Information:
Version 1.2.7 (SVN Rev 32341)

Copyright 1998-2010 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled with GTK+ 2.16.6, with GLib 2.22.4, with WinPcap (version unknown),
with libz 1.2.3, without POSIX capabilities, without libpcre, without SMI, with
c-ares 1.7.0, with Lua 5.1, with GnuTLS 2.8.5, with Gcrypt 1.4.5, without
Kerberos, with GeoIP, with PortAudio V19-devel (built Mar 31 2010), with
AirPcap.

Running on 64-bit Windows 7, build 7600, with WinPcap version 4.1.2 (packet.dll
version 4.1.0.2001), based on libpcap version 1.0 branch 1_0_rel0b (20091008),
GnuTLS 2.8.5, Gcrypt 1.4.5, without AirPcap.

Built using Microsoft Visual C++ 9.0 build 30729

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information.
--
While testing Pcap.Net (http://pcapdot.net), I've found this bug in Wireshark:
According to RFC 2616 (HTTP/1.1), the first line of an HTTP request looks like
that:

Request-Line   = Method SP Request-URI SP HTTP-Version CRLF

Note that there is a single space between the parts of the line.


Request-URI is defined in the same RFC like this:

Request-URI    = "*" | absoluteURI | abs_path | authority

These options for Request-URI are not defined in this RFC. However, they are
defined in RFC 2396 (Uniform Resource Identifiers (URI): Generic Syntax).
Specifically:

authority     = server | reg_name
server        = [ [ userinfo "@" ] hostport ]

This means that server can be empty (since everything is optional) and so
authority can be empty and so Request-URI can be empty.

So a Request that looks like these:

GET  HTTP/1.1\r\n

Should be parsed with empty URI (note that there are two spaces together).

However, Wireshark parses this as if the URI is HTTP/1.1.

In the attached file there is an HTTP layer with a DELETE request with an empty
URI and Wireshark takes the version part as the request URI.

Thank you,

Boaz.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.