💾 Archived View for rawtext.club › ~sloum › geminilist › 002654.gmi captured on 2020-09-24 at 02:58:20. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2020-09-24)

-=-=-=-=-=-=-

<-- back to the mailing list

Gemini proxy image display

Mr. Leveck leveck at leveck.us

Thu Sep 10 20:08:27 BST 2020

- - - - - - - - - - - - - - - - - - - 

On 9/10/20 11:50 AM, Mr. Leveck wrote:

On 9/10/20 11:38 AM, Charles E. Lehner wrote:
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

This led me to it. Thank you very much!

New code:

status = stream_get_line($socket,512,"\r\n");content = stream_get_contents($socket);

The first line strips off 512 bytes, or until \r\n is encountered. The second is much better for my intended use than fread at acquiring the rest. Binary files now work.

Now I need to iron out some other things like relative URLs...

-- jynxgopher://1436.ninjagemini://1436.ninja/https://leveck.us