[
https://issues.apache.org/jira/browse/THRIFT-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070049#comment-13070049
]
Hudson commented on THRIFT-1222:
--------------------------------
Integrated in Thrift #193 (See [https://builds.apache.org/job/Thrift/193/])
THRIFT-1222 Unhandled exception for TEvhttpServer request
Patch: Alexandre Parenteau
roger : http://svn.apache.org/viewvc/?view=rev&rev=1147542
Files :
* /thrift/trunk/test/cpp/src/TestClient.cpp
* /thrift/trunk/lib/cpp/src/async/TEvhttpClientChannel.cpp
* /thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
* /thrift/trunk/lib/cpp/Makefile.am
* /thrift/trunk/test/cpp/Makefile.am
* /thrift/trunk/test/cpp/src/TestServer.cpp
* /thrift/trunk/lib/cpp/src/async/TEvhttpServer.cpp
> 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