Gemini proxy image display

Charles E. Lehner cel at celehner.com
Thu Sep 10 18:38:27 BST 2020


Mr. Leveck,

I looked into it more, comparing this broken image:
https://leveck.us/gemini/1436.ninja/the_servers.png

with the good original:
gemini://1436.ninja/the_servers.png

The proxied one has this header "<!-- GEMINI! --><!-- 1436.ninja/the_servers.png --><!-- 192.168.0.45 -->". That breaks the image. Also, in the content at byte 24576 (0x6000), the files diverge. The proxied one seems to restart sending the PNG image there, with some bytes missing. Maybe a variable is incorrectly set in your code?

Charles

On Thu, 10 Sep 2020 11:35:10 -0600
"Mr. Leveck" <leveck at leveck.us> wrote:

> 
> 
> On 9/10/20 11:27 AM, Alex Schroeder wrote:
> 
> > I'm thinking you're going to toss out 8K which is probably much more
> > than just the status and the meta data. fread is going to read past
> > the \r\n terminating the status and it'll keep reading... and then
> > you toss it all out. I think what you need to do is read
> > everything, and then search and toss all the bytes up to the first
> > \n or something like that.
> > 
> > Cheers
> > Alex
> 
> One would think, but that is not the case. Since everyone is hung up
> on that instead of my actual query, I have captured that initial
> status and now display it on the top of gemini:// pages on the proxy.
> Prior to that I was 100% successful in capturing all the document
> content the proxy code was requesting. All I have done now is
> assigned it to a var named $status and print that in a displayed page
> header.
> 
> I am looking for advice on binary files. If anyone has any thoughts
> on that, it would be much appreciated.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20200910/8baca035/attachment.sig>


More information about the Gemini mailing list