Opened 7 years ago

Closed 7 years ago

#6849 closed enhancement (fixed)

Use of CSW service that requires POST REDIR

Reported by: gbernard Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 2.1.3
Severity: normal Keywords:
Cc:

Description

Presently when a service requires a redirection, the POST request is turned into a GET request after the redirection which can be a problem. I found out that adding the CURLOPT_POSTDIR option with the value CURL_REDIR_POST_ALL fix my issue (cpl_http.cpp line 600). This option instruct curl to retain the POST command after following a redirection. Would it make sense to add this option permanently ?

Attachments (1)

gdal-post-redir.patch (583 bytes ) - added by gbernard 7 years ago.
Patch adding the CURLOPT_POSTREDIR.

Download all attachments as: .zip

Change History (4)

comment:1 by Even Rouault, 7 years ago

Would it make sense to add this option permanently ?

Probably. Seems weir that POST gets turned into GET after redirection. Can you propose a patch ?

by gbernard, 7 years ago

Attachment: gdal-post-redir.patch added

Patch adding the CURLOPT_POSTREDIR.

comment:2 by gbernard, 7 years ago

I've added the very simple patch.

comment:3 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

In 37970:

CPLHTTPSetOptions(): make redirection of POST requests to still be POST requests after redirection (patch by gbernard, fixes #6849)

Note: See TracTickets for help on using tickets.