File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -515,6 +515,25 @@ export class AtelierAPI {
515515
516516 return data ;
517517 } catch ( error ) {
518+ if (
519+ error ?. message ?. includes ( "Connection: close" ) &&
520+ path ?. includes ( "/doc/" ) &&
521+ headers &&
522+ headers [ "IF-NONE-MATCH" ]
523+ ) {
524+ // This "Parse Error: Data after `Connection: close`" error is caused by
525+ // stricter behavior in the llhttp library introduced in Node 22/VS Code 1.101.0.
526+ // This only affects servers that use IIS as a web server, and it only occurs
527+ // when a 304 Not Modified response is sent from the server.
528+ // See https://github.com/intersystems-community/vscode-objectscript/issues/1583
529+ if ( outputTraffic ) {
530+ outputRequest ( ) ;
531+ outputChannel . appendLine ( `+- RESPONSE -----------------------------------------` ) ;
532+ outputChannel . appendLine ( "304 Not Modified" ) ;
533+ outputChannel . appendLine ( `+- END ----------------------------------------------` ) ;
534+ }
535+ throw { statusCode : 304 , message : "Not Modified" } ;
536+ }
518537 if ( outputTraffic && ! error . statusCode ) {
519538 // Only output errors here if they were "hard" errors, not HTTP response errors
520539 outputRequest ( ) ;
You can’t perform that action at this time.
0 commit comments