Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

OICGI and http headers (OpenInsight Specific)

At 12 JUN 1998 03:43:12PM abjones wrote:

I to redirect web documents using http and have discovered

that the http "Location:" directive for some web server software

needs to be first, but that OICGI needs "Content-type:" directive

first. Is there a means by which I can have OICGI allow "Location:"

to be first?


At 15 JUN 1998 09:42AM Gene Gleyzer Revelation wrote:

Abjones,

I believe you are reffering to an order of fields in HTTP responce. However, the responce from OpenInsight Internet Procedure goes to OICGI, which communicates with an HTTP server via CGI protocol, in which case the sintax is (I'm quoting the CGI 1.1 spec)

CGI-Responce=*(CGI-Header|HTTP-Header) NL Enity-Body

CGI-Header=Content-type | Location | Status | extension-header

The spec also sais: "If a body is supplied, then a Content-type header is required…". May be you just have to add some text to an entity-body?

Gene


At 16 JUN 1998 05:30PM abjones wrote:

Gene, I have been working with the code you posted to my question

of 22 May 1998 concerning re-direction of responce:

  • Notes:
  • (1) Content-Type field (section 7.1) must be first,
  • without this, INET_GATEWAY automatically generates
  • default responce header
  • (2) Status-Code: Moved Temporarily (see section 9.3)
  • code 301 (Moved Permanently) works as well, but 302 fits better
  • (3) Must be absolute URL (see section 10.11)
  • (4) End of Responce Header
  • (5) Not required
              responce=Content-type: text/html': \0A\ ;* (1)
              responce := 'Status: 302': \0A\ ;* (2)
              responce := 'Location: /oi-img/': imgName: \0A\ ;* (3)
              responce := \0D0A\ ;* (4)
              responce := 'any text that serves as a comment' ;* (5)

My particular concern is Note(1) because my "current server of choice" is Sambar Technologies and requires Location to be first. I use

Sambar only because it runs on both Win95 and WinNT with reasonable administration. Do you have alternative servers to suggest?

MS Personal Web Server handles the problem fine, but I am unexcited

about the FTP administration and I have not tried it on NT.

Thanks,

Blair Jones


At 17 JUN 1998 09:32AM Gene Gleyzer wrote:

Blair,

Did you try to put the "not required" entity-body (5) into the responce? If you did and it still didn't work, this is clearly a bug in the server's implementation of CGI protocol… However, there is a work-around for you. In OpenInsight 3.6.1 we added a "finalization" hook to the Internet request dispatcher (RUN_INET_REQUST). The finalization procedure (see INET_EQUATES insert record for details) gets to modify the HTTP responce right before it goes back to the server, so you can re-format the HTTP responce header in any way you wish.

Gene


At 18 JUN 1998 11:14AM abjones wrote:

Gene, Thanks for the help. Since the server documentation states that

"Location" must come first, this is obviously a "feature", not a serious "bug". Anyway, you have pulled the rabbit out of the hat for

me! Just one more thing I am not clear on. Do I write a new "CFG_KEY$" record into "CFG_TABLE$" to change the name of "CFG_FN_FINALIZE$" or is there a run-time variable to be set?

Will this changed record in SYSENV persist when I upgrade again?

ThanksOsoMuch! Blair


At 18 JUN 1998 01:56PM Gene Gleyzer wrote:

Blair,

The name of the finalizer is loaded from the record SYSENV/CFG_INET,

field 1 value 2. We may add some fields to the the CFG_INET record layout (INET_EQUATES), but we never change the record itself.

Gene

View this thread on the forum...