mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 776770 - Remove newline encoding from storage service server; r=rnewman
Functionality removed from spec in bug 775798.
This commit is contained in:
parent
b8ae60217f
commit
8a189d7d64
@ -711,9 +711,7 @@ StorageServerCollection.prototype = {
|
||||
if (newlines) {
|
||||
response.setHeader("Content-Type", "application/newlines", false);
|
||||
let normalized = data.map(function map(d) {
|
||||
let result = JSON.stringify(d);
|
||||
|
||||
return result.replace("\n", "\\u000a");
|
||||
return JSON.stringify(d);
|
||||
});
|
||||
|
||||
body = normalized.join("\n") + "\n";
|
||||
@ -756,10 +754,9 @@ StorageServerCollection.prototype = {
|
||||
}
|
||||
} else if (inputMediaType == "application/newlines") {
|
||||
for each (let line in inputBody.split("\n")) {
|
||||
let json = line.replace("\\u000a", "\n");
|
||||
let record;
|
||||
try {
|
||||
record = JSON.parse(json);
|
||||
record = JSON.parse(line);
|
||||
} catch (ex) {
|
||||
this._log.info("JSON parse error on line!");
|
||||
return sendMozSvcError(request, response, "8");
|
||||
|
Loading…
Reference in New Issue
Block a user