[ 
https://issues.apache.org/jira/browse/THRIFT-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063504#comment-13063504
 ] 

Roger Meier commented on THRIFT-1222:
-------------------------------------

Do you have a unittest or test client-server for that?

I would like to add a unittest (_/lib/cpp/test/_}) or a test client/server 
(_/test/cpp/_) to reproduce that issue.


> 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
>              Labels: patch
>             Fix For: 0.7
>
>   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

        

Reply via email to