Letractively / servdroidweb

Automatically exported from code.google.com/p/servdroidweb
0 stars 0 forks source link

Support for HTTP-method "HEAD" #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Hi,
i have attached another patch with the following enhancements:

- Support for HTTP "HEAD"-Requests: Some Proxys and Browsers are updating their 
cache with HTTP HEAD requests. Now servdroid is able to perform these requests.
- "405 Method Not Allowed" for POST requests and "400 Bad request" for 
unsupported HTTP/1.1 requests.
- Code cleanup: All reponse headers are written into a Map. 
- "trailing space redirect". Example: URL "/dir" is redirected to "/dir/". 
Apache mod_dir and IIS does this too.
- Enhanced date comparision while analyzing the "if-modified-since"-header.

Any comments?

Sorry for my bad english. I hope my code is much better :)

Jan

Original issue reported on code.google.com by JanDunkerbeck on 31 Oct 2010 at 12:44

Attachments:

GoogleCodeExporter commented 8 years ago
the patch is against the newest SVN-revision 34.

Original comment by JanDunkerbeck on 31 Oct 2010 at 12:49

GoogleCodeExporter commented 8 years ago
a patch for the patch :)

I think it is better to set a locale:

    private DateFormat httpDate = new SimpleDateFormat(HTTP_DATE_FORMAT,Locale.US);

otherwise the HTTP-Headers look faulty on my german android phone.

sorry ;)

Original comment by JanDunkerbeck on 31 Oct 2010 at 1:16

GoogleCodeExporter commented 8 years ago
Thank you for the patch!

I upload in the SVN the updated code and I will upload the application to the 
Android Market

Original comment by joanpuig...@gmail.com on 21 Nov 2010 at 7:37