summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
commitcfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch)
tree24d68c6f61c464ecba1e05670b80390ea3b0e50c /Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
parent69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff)
downloadqtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py')
-rw-r--r--Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py b/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
index 24bb2771a..930870961 100644
--- a/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
+++ b/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
@@ -59,6 +59,9 @@ class ReflectionHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_POST(self):
self._handle_request()
+ def do_HEAD(self):
+ self._handle_request()
+
def read_entity_body(self):
length = int(self.headers.getheader('content-length'))
return self.rfile.read(length)
@@ -116,7 +119,7 @@ class ReflectionHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.end_headers()
json.dump(json_object, self.wfile)
- def _serve_file(self, file_path, cacheable_seconds=0):
+ def _serve_file(self, file_path, cacheable_seconds=0, headers_only=False):
if not os.path.exists(file_path):
self.send_error(404, "File not found")
return
@@ -136,4 +139,5 @@ class ReflectionHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.send_header("Expires", expires_formatted)
self.end_headers()
- shutil.copyfileobj(static_file, self.wfile)
+ if not headers_only:
+ shutil.copyfileobj(static_file, self.wfile)