https://bugzilla.wikimedia.org/show_bug.cgi?id=37843

--- Comment #7 from Roan Kattouw <[email protected]> 2012-10-26 21:05:26 
UTC ---
(In reply to comment #1)
> That blank page shouldn't have been possible to create in the first place.
You can easily create a blank page by first creating a page with content, then
blanking it.

(In reply to comment #4)
> Parsoid does handle zero length content -- it returns a zero length HTML
> response. Right now, VisualEditor extension expects a non-zero HTML response
> and returns an error if not (line 18 of ApiVisualEditor.php).  This can be
> verified at this url:
> https://www.mediawiki.org/w/api.php?action=ve-parsoid&paction=parse&page=VisualEditor%3AHello_there&format=json
> (for other pages, the result is success with a valid parsed string).
Thanks Subbu, that's exactly what was going on. Fix submitted in
https://gerrit.wikimedia.org/r/30281 .

> So,
> either ApiVisualEditor.php has to handle a zero-length response as a valid
> response, and we need a different way to signal errors from Parsoid, or 
> Parsoid
> has to always return a non-zero response.   My hunch is that as long as 
> Parsoid
> returns a 200 OK, ApiVisualEditor accept a zero-length response as a valid
> response (and if necessary, have sanity checks somewhere -- a non-zero length
> body should not return a zero-length response, maybe).  Error conditions from
> Parsoid could be signaled with a different HTTP response code maybe (offhand,
> 503 is one option). At this time, I am not sure what the right solution is, 
> but
> hopefully this will help figure out what that might be.
I verified that nonexistent pages give me a 404, so I think this is fine. I
haven't checked other error conditions because they're nontrivial to reproduce,
but as long as Parsoid only returns a 2xx status code when it's actually
delivering parsed content and uses 4xx/5xx for errors, I'll be fine.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to