[
https://issues.apache.org/jira/browse/THRIFT-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roger Meier resolved THRIFT-1222.
---------------------------------
Resolution: Fixed
Assignee: alexandre parenteau
committed, thanks for the patch!
> Unhandled exception for TEvhttpServer request
> ---------------------------------------------
>
> Key: THRIFT-1222
> URL: https://issues.apache.org/jira/browse/THRIFT-1222
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.6.1, 0.7
> Environment: Any
> Reporter: alexandre parenteau
> Assignee: alexandre parenteau
> Labels: patch
> Fix For: 0.7
>
> Attachments: thrift-1222.patchv0.2.txt
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> When an error occur during a HTTP request, exceptions are not captured before
> entering back libevent. For example a simple 'curl http://localhost:8080'
> will trigger a 'not enough data' exception, however no code will actually set
> the HTTP status (triggering a unhandled exception, and a crash).
> Here is a proposed change:
> void TEvhttpServer::request(struct evhttp_request* req, void* self) {
> try {
> static_cast<TEvhttpServer*>(self)->process(req);
> } catch(std::exception& e) {
> evhttp_send_reply(req, HTTP_INTERNAL, e.what(), 0);
> }
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira