× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



So, I have a customer using my GETURI tool. What it does (in case you're
not familiar) is makes a request to a web server, returning the results to a
file, stream file or the screen.

One customer reported that while grabbing an image from a web page, the CRLF
characters are actually being changed to x'08'. I thought this was odd, so
I ran some tests. Couldn't get it to happen.

Then I used their exact command. Sure enough, the headers were ended with
x'08' instead of x'0D0A'.

So I put my application in debug. It wrote the headers to the stream file
then I stopped at a breakpoint right before writing the rest to the stream
file. The headers ended in x'0D0A'... I stepped through to write the rest,
and now they were x'08'! Here's an example:

After writing header:
----------------------------
8545450 2F312E31 20323030 204F4B0D 0A HTTP/1.1 200 OK
4617465 3A205765 642C2030 32204A61 6E203230 Date: Wed, 02 Jan 20
3657276 65723A20 41706163 68652F32 2E302E35 Server: Apache/2.0.5
36F6E6E 65637469 6F6E3A20 636C6F73 650D0A Connection: close
36F6E74 656E742D 54797065 3A20696D 6167652F Content-Type: image/

After writing the rest:
----------------------------
48545450 2F312E31 20323030 204F4B08 HTTP/1.1 200 OK
44617465 3A205765 642C2030 32204A61 6E203230 Date: Wed, 02 Jan 20
53657276 65723A20 41706163 68652F32 2E302E35 Server: Apache/2.0.5
436F6E6E 65637469 6F6E3A20 636C6F73 6508 Connection: close
436F6E74 656E742D 54797065 3A20696D 6167652F Content-Type: image/
08
FFD8FFE0 00104A46 49460001 01000001 00010000 ÿøÿàJFIF
08
07090B12 0C0B0A0A 0B171011 0D121B17 1C1C1A17
08
08
0B0A0B16 0C0C162E 1E1A1E2E 2E2E2E2E 2E2E2E2E ..........
0094006E 03012200 02110103 1101FFC4 001F0000 n"ÿä
090A0BFF C400B510 00020103 03020403 05050404 ÿäµ


So I run some more tests. REturning to a PF and the CRLFs are fine.

My application can also take the header and write it to a separate file so
that the header isn't included in the actual "data" returned from the
server. I do that and the CRLFs are fine.

I am going to do some more debugging, but this only seems to happen on this
one particular request. Just wanted to see if anyone had any ideas of why
this would be happening... to me, it seems like a bug in the OS that
somehow got tripped doing everything exactly right. Then again, it may be a
bug on my end as well. :)


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.