Skip to content

Commit

Permalink
improvement: change /replay and /replay-normalized content-type respo…
Browse files Browse the repository at this point in the history
…nse header from application/json to application/x-json-stream
  • Loading branch information
thaaddeus committed Aug 16, 2022
1 parent 51377ae commit 0567898
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/http/replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function writeMessagesToResponse(res: OutgoingMessage, replayOptions: Repl
const BATCH_SIZE = 32

// not 100% sure that's necessary since we're returning ndjson in fact, not json
res.setHeader('Content-Type', 'application/json')
res.setHeader('Content-Type', 'application/x-json-stream')

let buffers: Buffer[] = []
let totalMessagesCount = 0
Expand Down
2 changes: 1 addition & 1 deletion src/http/replaynormalized.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const replayNormalizedHttp = async (req: IncomingMessage, res: ServerResp
async function writeMessagesToResponse(res: OutgoingMessage, options: ReplayNormalizedRequestOptions) {
const BATCH_SIZE = 32

res.setHeader('Content-Type', 'application/json')
res.setHeader('Content-Type', 'application/x-json-stream')

let buffers: string[] = []
let totalMessagesCount = 0
Expand Down

0 comments on commit 0567898

Please sign in to comment.