Proxy crops body content in response #18

Open
opened 2024-02-05 19:46:35 +00:00 by d4708 · 2 comments

Hello,

I have strange issue by running twins as reverse-proxy for few websites as in config:

listen: 94.140.114.89:1965
hosts:
  kevachat.ygg:
    cert: /home/twins/kevachat.ygg/cert.pem
    key: /home/twins/kevachat.ygg/key.rsa
    paths:
      -
        path: /
        proxy: gemini-insecure://[301:23b4:991a:634d::1965]:1965
  betahowto.ygg:
    cert: /home/twins/betahowto.ygg/cert.pem
    key: /home/twins/betahowto.ygg/key.rsa
    paths:
      -
        path: /
        proxy: gemini-insecure://[301:23b4:991a:634d::b]:1965

I've tried to pass size attribute and play with line separators, but no success.
it also crops images always on different file size, sometimes they loading successfully but very rare.

Content usually cropping at ~80% the size is different on each request but estimated same

Just disabled twins, those addresses in example linked to Yggdrasil network, to reproduce here is the Clearnet address:
gemini://betahowto.duckdns.org

I don't think that instance contain invalid headers, maybe something wrong with body, or just server..
By using proxying to localhost no success also, even IPv4

No ideas, maybe the bug?

p.s. using this bin version:
go get code.rocketnine.space/tslocum/twins

Hello, I have strange issue by running twins as reverse-proxy for few websites as in config: ``` listen: 94.140.114.89:1965 hosts: kevachat.ygg: cert: /home/twins/kevachat.ygg/cert.pem key: /home/twins/kevachat.ygg/key.rsa paths: - path: / proxy: gemini-insecure://[301:23b4:991a:634d::1965]:1965 betahowto.ygg: cert: /home/twins/betahowto.ygg/cert.pem key: /home/twins/betahowto.ygg/key.rsa paths: - path: / proxy: gemini-insecure://[301:23b4:991a:634d::b]:1965 ``` I've tried to pass `size` attribute and play with line separators, but no success. it also crops images always on different file size, sometimes they loading successfully but very rare. Content usually cropping at ~80% the size is different on each request but estimated same Just disabled twins, those addresses in example linked to Yggdrasil network, to reproduce here is the Clearnet address: gemini://betahowto.duckdns.org I don't think that instance contain invalid headers, maybe something wrong with body, or just server.. By using proxying to localhost no success also, even IPv4 No ideas, maybe the bug? p.s. using this bin version: `go get code.rocketnine.space/tslocum/twins`
Owner

Thanks. Using nc to fetch the page doesn't seem to reproduce the issue. twins uses io.Copy which should copy until EOF when the server closes the connection. Quoting the spec:

The server closes the connection after the final byte, there is no "end of response" signal.

It sounds like a chunking issue of some kind, on twins end or the server's end. I will need to look into this more closely to be sure.

Thanks. Using `nc` to fetch the page doesn't seem to reproduce the issue. twins uses `io.Copy` which should copy until EOF when the server closes the connection. Quoting the spec: > The server closes the connection after the final byte, there is no "end of response" signal. It sounds like a chunking issue of some kind, on twins end or the server's end. I will need to look into this more closely to be sure.
Author

Hm, just installed gmid and it works, maybe something with go lib

Thoughts it was IPv6 issue but nope - it also crops on localhost

Hm, just installed `gmid` and it works, maybe something with go lib Thoughts it was IPv6 issue but nope - it also crops on localhost
tslocum added the
bug
label 2024-02-07 17:49:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tslocum/twins#18
No description provided.