As per my understanding of the RFC, it should accept absolute path (what I
used to call a relative URI, but which is an agregate of absolute path,
relative path and net path) :

*5.1)*

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


*5.1.1)*

Method         = "OPTIONS"                ; Section 9.2
<http://tools.ietf.org/html/rfc2616#section-9.2>
                      | "GET"                    ; Section 9.3
<http://tools.ietf.org/html/rfc2616#section-9.3>
                      | "HEAD"                   ; Section 9.4
<http://tools.ietf.org/html/rfc2616#section-9.4>
                      | "POST"                   ; Section 9.5
<http://tools.ietf.org/html/rfc2616#section-9.5>
                      | "PUT"                    ; Section 9.6
<http://tools.ietf.org/html/rfc2616#section-9.6>
                      | "DELETE"                 ; Section 9.7
<http://tools.ietf.org/html/rfc2616#section-9.7>
                      | "TRACE"                  ; Section 9.8
<http://tools.ietf.org/html/rfc2616#section-9.8>
                      | "CONNECT"                ; Section 9.9
<http://tools.ietf.org/html/rfc2616#section-9.9>
                      | extension-method
       extension-method = token


So let's pick for example the "POST" method.

*5.1.2)*

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


So l let the common absoluteURI alone which is working, and I pick the*abs_path
*.

The definition of abs_path is taken, according to paragraph 3.2.1, from the
RFC 2396.
This RFC 2396 defines it as :

abs_path      = "/"  path_segments

path_segments = segment *( "/" segment )
segment       = *pchar *( ";" param )
param         = *pchar
pchar         = unreserved | escaped |
                ":" | "@" | "&" | "=" | "+" | "$" | ","

unreserved  = alphanum | mark
mark        = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"

escaped     = "%" hex hex
hex         = digit | "A" | "B" | "C" | "D" | "E" | "F" |
                      "a" | "b" | "c" | "d" | "e" | "f"

The RFC 3986, which obsoletes the RFC 2396, replace abs_path with path-absolute
which is defined as:

path-absolute = "/" [ segment-nz *( "/" segment ) ]

segment       = *pchar
segment-nz    = 1*pchar
segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
                    ; non-zero-length segment without any colon ":"
pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"

Which are both definitions of an absolute path, so, I should be able to use
an absolute path (and not a relative URI sorry about that) as a Request-URI,
shouldn't I ?

Thanks for reading.

2013/2/22 sebb <[email protected]>

> On 22 February 2013 17:09, Damien Garrido <[email protected]>
> wrote:
> > 2013/2/22 sebb <[email protected]>
> >
> >> On 22 February 2013 15:49, Damien.Garrido <
> [email protected]>
> >> wrote:
> >> > Is JMeter compliant with the 2616 (Hyper Text Protocol -- HTTP/1.1)
> and
> >> 3986
> >> > (Uniform Resource Identifier (URI): Generic Syntax) RFCs ?
> >>
> >> JMeter uses 3 different external HTTP implementations:
> >> - Java
> >> - Apache HttpClient 3.1
> >> - Apache HttpComponents 4.x
> >>
> >> AFAIK these are RFC compliant.
> >>
> >> I meant: let me use a relative URI instead of forcing me using an
> absolute
> > URL.
>
> But are relative URIs spec compliant?
>
> According to RFC 2616 they are only used for Content-Location and Referer.
>
> > I haven't used those implementation enough to say that they will let me
> use
> > a relative URI or not, and I haven't tested it yet, but I had a look at
> the
> >  implementation of JMeter, and it is using intensively the URL Java class
> > and not the URI Java class.
> > This URL class forces the scheme and hostname to be present, so I would
> say
> > that it not possible to use relative URI unless if some or all URL
> classes
> > are changed by URI classes in the JMeter source code... Or it does not
> come
> > from that point, and something else I haven't thought of yet is hassling
> > me! :/
> >
> >> Is it possible to specify in the Request-Line of the HTTP request, an
> >> > abs_path (or path-absolute) form of a Request-URI as specified in the
> >> > paragraph 5.1.2 of the RFC 2616 ?
> >>
> >> Yes, though not directly, as JMeter does not create the request
> directly.
> >> The HTTP request is built by the HTTP implementation from the
> >> parameters JMeter provides, which in turn are provided by the test
> >> script.
> >>
> >> You can see the request in the Tree View Listener.
> >> Or use the Mirror Server to see exactly what is sent.
> >>
> > I saw in this Tree View Listerner that JMeter is sending a full URI,
> (and I
> > also checked with Wireshark...)
> >
> >>
> >
> > It looks like they all provide abs_path requests, for example:
> >>
> >> GET /abcd/def HTTP/1.1
> >> Host: a.b.c
> >>
> > I have to find what prevents me to get what you got...
> >
> >>
> >> You can use the Header Manager to override the Host: header.
> >>
> > I'm already using this Header Manager to override the Host header, but it
> > seems that Apache isn't routing to the right virtual host if the URI is
> > absolute, or I'm missing something...
> >
> >>
> >>
> >> Should I post on the dev mailing-list ?
> >>
> >> No.
> >>
> > Ok. :)
> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> > Thanks for your reply anyway !
> >
> > --
> > Damien Garrido
> > Sogeti High Tech
> > Mobile:+33 (0)6 15 077 001
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Damien Garrido
Sogeti High Tech
Mobile:+33 (0)6 15 077 001

Reply via email to