Author: jfarrell
Date: Wed Aug 22 02:57:07 2012
New Revision: 1375883

URL: http://svn.apache.org/viewvc?rev=1375883&view=rev
Log:
Thrift-1656: Setting proper headers in THttpServer.cpp so that "Cross-Origin 
Resource Sharing" on js client can work.
Client: cpp
Patch: Shantanu Choudhary

Set headers from server side, in the response, so that Javascript can handle 
Cross-site HTTP requests.


Modified:
    thrift/trunk/lib/cpp/src/thrift/transport/THttpServer.cpp

Modified: thrift/trunk/lib/cpp/src/thrift/transport/THttpServer.cpp
URL: 
http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/src/thrift/transport/THttpServer.cpp?rev=1375883&r1=1375882&r2=1375883&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/src/thrift/transport/THttpServer.cpp (original)
+++ thrift/trunk/lib/cpp/src/thrift/transport/THttpServer.cpp Wed Aug 22 
02:57:07 2012
@@ -88,6 +88,7 @@ void THttpServer::flush() {
     "HTTP/1.1 200 OK" << CRLF <<
     "Date: " << getTimeRFC1123() << CRLF <<
     "Server: Thrift/" << VERSION << CRLF <<
+    "Access-Control-Allow-Origin: *" << CRLF <<
     "Content-Type: application/x-thrift" << CRLF <<
     "Content-Length: " << len << CRLF <<
     "Connection: Keep-Alive" << CRLF <<


Reply via email to