New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--request-target: instead of --strip-path-slash #1593

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@bagder
Member

bagder commented Jun 19, 2017

... and CURLOPT_REQUEST_TARGET instead of CURLOPT_STRIP_PATH_SLASH.

This option instead provides the full "alternative" target to use in the
request, instead of extracting the path from the URL.

Test 1298 and 1299 updated accordingly.

Idea-by: Evert Pot
Suggestion: https://daniel.haxx.se/blog/2017/06/19/options-with-curl/comment-page-1/#comment-18373

--request-target: instead of --strip-path-slash
... and CURLOPT_REQUEST_TARGET instead of CURLOPT_STRIP_PATH_SLASH.

This option instead provides the full "alternative" target to use in the
request, instead of extracting the path from the URL.

Test 1298 and 1299 updated accordingly.

Idea-by: Evert Pot
Suggestion: https://daniel.haxx.se/blog/2017/06/19/options-with-curl/comment-page-1/#comment-18373
@coveralls

This comment has been minimized.

coveralls commented Jun 19, 2017

Coverage Status

Coverage increased (+0.07%) to 73.881% when pulling 18c239d on bagder/request-target into b778ae4 on master.

@jay

This comment has been minimized.

Member

jay commented Jun 20, 2017

what's the use case for this that can't be done with strip leading slash

@bagder

This comment has been minimized.

Member

bagder commented Jun 20, 2017

I'd say they cover pretty much the same use cases. This approach has the benefit in my mind that it makes it more visible and straight-forward to the user as to what is actually sent, while the "strip slash" option is a more subtle description of how to change the transition from a URL to a HTTP request target.

@coveralls

This comment has been minimized.

coveralls commented Jun 20, 2017

Coverage Status

Coverage decreased (-0.02%) to 73.793% when pulling 629b6c8 on bagder/request-target into b778ae4 on master.

@bagder bagder closed this in 9b167fd Jun 21, 2017

@bagder bagder deleted the bagder/request-target branch Jun 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment