Suite of AT Protocol TypeScript libraries built on web standards
20
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix xrpc-server readablestream decoding

+9 -4
+1 -1
lex-gen/deno.json
··· 1 1 { 2 2 "name": "@atp/lex-gen", 3 - "version": "0.1.0-alpha.1", 3 + "version": "0.1.0-alpha.2", 4 4 "exports": "./mod.ts", 5 5 "license": "MIT", 6 6 "imports": {
+1 -1
xrpc-server/deno.json
··· 1 1 { 2 2 "name": "@atp/xrpc-server", 3 - "version": "0.1.0-alpha.2", 3 + "version": "0.1.0-alpha.3", 4 4 "exports": "./mod.ts", 5 5 "license": "MIT", 6 6 "imports": {
+7 -2
xrpc-server/util.ts
··· 248 248 } 249 249 const text = await req.text(); 250 250 return JSON.parse(text); 251 - } else { 251 + } else if ( 252 + encoding.startsWith("text/") || 253 + encoding === "application/x-www-form-urlencoded" 254 + ) { 252 255 if (textLimit && bodySize > textLimit) { 253 256 throw new InvalidRequestError( 254 257 `Request body too large: ${bodySize} bytes exceeds text limit of ${textLimit} bytes`, 255 258 ); 256 259 } 257 260 return await req.text(); 261 + } else { 262 + return; 258 263 } 259 264 }; 260 265 } ··· 271 276 } 272 277 273 278 if (!contentEncoding) { 274 - return req.body.pipeThrough(new TextDecoderStream()); 279 + return req.body; 275 280 } 276 281 277 282 if (!contentLength) {