You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by 西村俊夫 <ni...@gmail.com> on 2008/10/09 14:27:55 UTC

UriPatternMatcher

Hi, all

When many web browsers make a HTTP request, they make "Host" header.
For example,
to access http://hc.apache.org/httpcomponents-client/primer.html they
make following lines;

GET /httpcomponents-client/primer.html  HTTP/1.1
HOST: hc.apache.org

But, we can make;

GET http://hc.apache.org/httpcomponents-client/primer.html HTTP/1.1

or

GET http://hc.apache.org:80/httpcomponents-client/primer.html HTTP/1.1

When I regist a HttpRequestHandler to HttpRequestHandlerRegistry, I
assign a uri-patten.
For example, I will assign "/httpcomponents-client". It matches to
"/httpcomponents-client/primer.html" . But it doesn't to
"http://hc.apache.org/httpcomponents-client/primer.html".

Should I make own UriPatternMatcher?

Regards,
Nishimu

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: UriPatternMatcher

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2008-10-09 at 21:27 +0900, 西村俊夫 wrote:
> Hi, all
> 
> When many web browsers make a HTTP request, they make "Host" header.
> For example,
> to access http://hc.apache.org/httpcomponents-client/primer.html they
> make following lines;
> 
> GET /httpcomponents-client/primer.html  HTTP/1.1
> HOST: hc.apache.org
> 
> But, we can make;
> 
> GET http://hc.apache.org/httpcomponents-client/primer.html HTTP/1.1
> 
> or
> 
> GET http://hc.apache.org:80/httpcomponents-client/primer.html HTTP/1.1
> 
> When I regist a HttpRequestHandler to HttpRequestHandlerRegistry, I
> assign a uri-patten.
> For example, I will assign "/httpcomponents-client". It matches to
> "/httpcomponents-client/primer.html" . But it doesn't to
> "http://hc.apache.org/httpcomponents-client/primer.html".
> 
> Should I make own UriPatternMatcher?
> 
> Regards,
> Nishimu
> 

Nishimu

You should implement a custom HttpRequestHandlerResolver based on a more
sophisticated pattern matching mechanism (such as regular expressions)

Hope this helps

Oleg


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org