Changeset 94481 in webkit
- Timestamp:
- Sep 3, 2011 12:29:34 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r94470 r94481 1 2011-09-03 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r94453. 4 http://trac.webkit.org/changeset/94453 5 https://bugs.webkit.org/show_bug.cgi?id=67557 6 7 Caused appcache test to fail on various bots (Requested by 8 rniwa on #webkit). 9 10 * Scripts/webkitpy/layout_tests/port/webkit.py: 11 1 12 2011-09-02 Michael Saboff <msaboff@apple.com> 2 13 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py
r94458 r94481 510 510 timeout=self._server_process.timed_out, error=error) 511 511 512 LENGTH_HEADER = 'Content-Length: '513 HASH_HEADER = 'ActualHash: '514 TYPE_HEADER = 'Content-Type: '515 ENCODING_HEADER = 'Content-Transfer-Encoding: '516 517 def _read_line_until(self, deadline):518 return self._server_process.read_line(deadline - time.time())519 520 512 def _read_block(self, deadline): 513 LENGTH_HEADER = 'Content-Length: ' 514 HASH_HEADER = 'ActualHash: ' 515 TYPE_HEADER = 'Content-Type: ' 516 ENCODING_HEADER = 'Content-Transfer-Encoding: ' 521 517 content_type = None 522 518 encoding = None … … 525 521 526 522 # Content is treated as binary data even though the text output is usually UTF-8. 527 content = str() # FIXME: Should be bytearray() once we require Python 2.6. 528 line = self._read_line_until(deadline - time.time()) 523 content = '' 524 timeout = deadline - time.time() 525 line = self._server_process.read_line(timeout) 529 526 eof = False 530 527 while (not self._server_process.timed_out and not self.detected_crash() and not eof): 531 chomped_line = line.rstrip() # FIXME: This will remove trailing lines from test output. Is that right?528 chomped_line = line.rstrip() 532 529 if chomped_line.endswith("#EOF"): 533 530 eof = True … … 536 533 if line.startswith(self.TYPE_HEADER) and content_type is None: 537 534 content_type = line.split()[1] 538 elif line.startswith( self.ENCODING_HEADER) and encoding is None:535 elif line.startswith(ENCODING_HEADER) and encoding is None: 539 536 encoding = line.split()[1] 540 elif line.startswith(self.LENGTH_HEADER) and content_length is None: 541 content_length = int(line[len(self.LENGTH_HEADER):]) 542 # FIXME: In real HTTP there should probably be a blank line 543 # after headers before content, but DRT doesn't write one. 544 content = self._server_process.read(deadline - time.time(), content_length) 545 elif line.startswith(self.HASH_HEADER): 537 elif line.startswith(LENGTH_HEADER) and content_length is None: 538 timeout = deadline - time.time() 539 content_length = int(line[len(LENGTH_HEADER):]) 540 # FIXME: Technically there should probably be another blank 541 # line here, but DRT doesn't write one. 542 content = self._server_process.read(timeout, content_length) 543 elif line.startswith(HASH_HEADER): 546 544 content_hash = line.split()[1] 547 545 elif line: 548 546 content += line 549 if eof:550 break551 line = self._read_line_until(deadline)547 if not eof: 548 line = self._server_process.read_line(timeout) 549 timeout = deadline - time.time() 552 550 return ContentBlock(content_type, encoding, content_hash, content) 553 551
Note: See TracChangeset
for help on using the changeset viewer.