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.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1375883 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/thrift/transport/THttpServer.cpp b/lib/cpp/src/thrift/transport/THttpServer.cpp
index b10e6da..d723196 100644
--- a/lib/cpp/src/thrift/transport/THttpServer.cpp
+++ b/lib/cpp/src/thrift/transport/THttpServer.cpp
@@ -88,6 +88,7 @@
     "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 <<