NetTalk Central

Author Topic: Chrome ERR_INVALID_HTTP_RESPONSE  (Read 3108 times)

Jane

  • Sr. Member
  • ****
  • Posts: 349
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Chrome ERR_INVALID_HTTP_RESPONSE
« on: August 24, 2018, 04:24:17 PM »
Maybe this will save somebody else an hour of head-scratching...

Something I'm doing on a particular project involves a jquery function using setTimeout with .load to keep refreshing the content of a particular <div>

Worked fine in my first iteration where the function loaded a text file containing the HTML snippets that needed to be updated.

Then I tried switching to having the jquery function call a NetWebPage whose page type is set to XML to have that just return the updated content from a stringtheory object without first saving it to disk as a text file.

Worked fine on firefox and edge.  Chrome errored with the ERR_INVALID_HTTP_RESPONSE

After an hour with friend google I discovered that Chrome refuses to allow such stuff on port 88.  Switched the app to port 80 and all is happy.

Some days I feel my age more than others.... sigh...  ::)

Jane

  • Sr. Member
  • ****
  • Posts: 349
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Chrome ERR_INVALID_HTTP_RESPONSE
« Reply #1 on: August 25, 2018, 02:39:24 PM »
A more viable solution for my situation is to set the NetWebPage to HTML, allow it to send the server header text rows, then inject my StringTheory object and return before the template code generates all  the HTML, HEAD, TITLE  and other tags and code.

While I could just mark the checkboxes not to include scripts, css, etc, I'd still prefer not to inject the various duplicate sections into the middle of my page... even though the various browsers seem to handle it OK.

In any event, with the server headers sent, Chrome stops complaining and lets my <div> refresh work even if the server is set to a non-standard port. 

Another reminder to test weird stuff on all browsers, since IE, Edge, and Firefox worked with my original kludge.



Jane

Rene Simons

  • Hero Member
  • *****
  • Posts: 649
    • View Profile
Re: Chrome ERR_INVALID_HTTP_RESPONSE
« Reply #2 on: February 14, 2024, 10:59:58 PM »
Hi Jane,

In my quest for a solution why my HTML page did not show in the browser, your work-around provided me with a solution.
I.e. a solution that made it possible to move forward without using packet.savefile(file) to inspect the result of my operations.

Thanks again.

Ren? Simons
Rene Simons
NT14.14