Skip to content
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 from

Conversation

bagder
Copy link
Member

@bagder 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

... 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
Copy link

Coverage Status

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

@jay
Copy link
Member

jay commented Jun 20, 2017

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

@bagder
Copy link
Member Author

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
Copy link

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 June 21, 2017 21:39
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants