Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for reporting HTTP errors #8

Closed
ecampidoglio opened this issue Aug 10, 2017 · 4 comments
Closed

Add support for reporting HTTP errors #8

ecampidoglio opened this issue Aug 10, 2017 · 4 comments

Comments

@ecampidoglio
Copy link
Member

When HTTP servers fail to fulfill a request, they will often return an HTML page with the error information to the client. In situations like these, curl will simply send the content of the error page to stdout and exit with a zero exit code. While this may be fine at the command line, it can be quite problematic in scripts, since it may lead to false positives. 😱

Fortunately, we can tell curl to consider HTTP errors (4xx and 5xx) for what they are and exit with a non-zero status code by passing it the -f --fail option.

Cake.Curl should support that in the CurlSettings class.

@ecampidoglio ecampidoglio added this to the 1.1.0 milestone Aug 10, 2017
@ecampidoglio ecampidoglio modified the milestones: 1.1.0, 1.2.0 Oct 23, 2017
@ecampidoglio ecampidoglio modified the milestones: 2.1.0, 3.0, 3.1 May 16, 2018
@deqenq
Copy link
Member

deqenq commented Feb 21, 2019

Hello, can I work on this as my first contribution?

@ecampidoglio
Copy link
Member Author

@deqenq Sure! Let me know if you have any questions. 🙂

@deqenq
Copy link
Member

deqenq commented Feb 23, 2019

PR sent

ecampidoglio added a commit that referenced this issue Feb 24, 2019
@ecampidoglio
Copy link
Member Author

@deqenq Merged in 89e2235. Thank you for your contribution. 🎉

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants