Bug 62377

Summary: Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens.
Product: WebKit Reporter: Ilya Tikhonovsky <loislo>
Component: Web Inspector (Deprecated)Assignee: Ilya Tikhonovsky <loislo>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 62440    
Bug Blocks:    
Attachments:
Description Flags
[patch] initial version
none
[patch] second version yurys: review+, yurys: commit-queue-

Ilya Tikhonovsky
Reported 2011-06-09 07:47:55 PDT
What steps will reproduce the problem? 1. Connect to the remote debugging websocket via a script (not a browser) 2. send the following JSON message '{"id":1, "method":"Console.enable"}' (note the space between the first value and the second key) What is the expected result? Chrome returns a success response. What happens instead? Chrome returned the following error: {"error":{"code":-32700,"message":"Parse error.","data":["Message should be in JSON format."]},"id":null} Please provide any additional information below: If I remove the whitespace between the first value and the next key I get back a successful response. UserAgentString: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.36 (KHTML, like Gecko) Chrome/13.0.767.1 Safari/534.36
Attachments
[patch] initial version (4.97 KB, patch)
2011-06-09 08:10 PDT, Ilya Tikhonovsky
no flags
[patch] second version (8.92 KB, patch)
2011-06-10 01:30 PDT, Ilya Tikhonovsky
yurys: review+
yurys: commit-queue-
Ilya Tikhonovsky
Comment 1 2011-06-09 08:10:50 PDT
Created attachment 96591 [details] [patch] initial version
Yury Semikhatsky
Comment 2 2011-06-09 23:31:35 PDT
Comment on attachment 96591 [details] [patch] initial version View in context: https://bugs.webkit.org/attachment.cgi?id=96591&action=review > Source/WebCore/inspector/InspectorValues.cpp:189 > +Token parseToken(const UChar*& start, const UChar* end, const UChar** tokenEnd) Let's split input start and output tokenStart.
Ilya Tikhonovsky
Comment 3 2011-06-10 01:30:55 PDT
Created attachment 96711 [details] [patch] second version comments addressed
Ilya Tikhonovsky
Comment 4 2011-06-10 01:33:27 PDT
Note You need to log in before you can comment on or make changes to this bug.