Map Uploader integration not handling redirects #81

Closed
opened 2026-10-05 01:56:29 +02:00 by adam · 1 comment
Owner

The map uploader integration doesn't handle redirects and logs a warning instead of following the redirect:

Mar 29 11:31:55 phi uvicorn[356522]: 2026-03-29 11:31:55 - httpx - INFO - HTTP Request: POST https://map.meshcore.dev/api/v1/uploader/node "HTTP/1.1 307 Temporary Redirect"
Mar 29 11:31:55 phi uvicorn[356522]: 2026-03-29 11:31:55 - app.fanout.map_upload - WARNING - MapUpload: server returned 307 for XXXXXXXX: <html>
Mar 29 11:31:55 phi uvicorn[356522]: <head><title>307 Temporary Redirect</title></head>
Mar 29 11:31:55 phi uvicorn[356522]: <body>
Mar 29 11:31:55 phi uvicorn[356522]: <center><h1>307 Temporary Redirect</h1></center>
Mar 29 11:31:55 phi uvicorn[356522]: <hr><center>nginx</center>
Mar 29 11:31:55 phi uvicorn[356522]: </body>
Mar 29 11:31:55 phi uvicorn[356522]: </html>

I can confirm that changing:

https://github.com/jkingsman/Remote-Terminal-for-MeshCore/blob/7151cf384650ca59abb2d0354156340f3c337b30/app/fanout/map_upload.py#L114

To this:

        self._client = httpx.AsyncClient(timeout=httpx.Timeout(15.0), follow_redirects=True)

Fixes the issue and allows redirects. The log after the change:

Mar 29 12:52:01 phi uvicorn[367705]: 2026-03-29 12:52:01 - httpx - INFO - HTTP Request: POST https://map.meshcore.dev/api/v1/uploader/node "HTTP/1.1 307 Temporary Redirect"
Mar 29 12:52:02 phi uvicorn[367705]: 2026-03-29 12:52:02 - httpx - INFO - HTTP Request: POST https://map.meshcore.io/api/v1/uploader/node "HTTP/1.1 200 OK"
Mar 29 12:52:02 phi uvicorn[367705]: 2026-03-29 12:52:02 - app.fanout.map_upload - INFO - MapUpload: uploaded XXXXXXXX (repeater) → HTTP 200
The map uploader integration doesn't handle redirects and logs a warning instead of following the redirect: ``` Mar 29 11:31:55 phi uvicorn[356522]: 2026-03-29 11:31:55 - httpx - INFO - HTTP Request: POST https://map.meshcore.dev/api/v1/uploader/node "HTTP/1.1 307 Temporary Redirect" Mar 29 11:31:55 phi uvicorn[356522]: 2026-03-29 11:31:55 - app.fanout.map_upload - WARNING - MapUpload: server returned 307 for XXXXXXXX: <html> Mar 29 11:31:55 phi uvicorn[356522]: <head><title>307 Temporary Redirect</title></head> Mar 29 11:31:55 phi uvicorn[356522]: <body> Mar 29 11:31:55 phi uvicorn[356522]: <center><h1>307 Temporary Redirect</h1></center> Mar 29 11:31:55 phi uvicorn[356522]: <hr><center>nginx</center> Mar 29 11:31:55 phi uvicorn[356522]: </body> Mar 29 11:31:55 phi uvicorn[356522]: </html> ``` I can confirm that changing: https://github.com/jkingsman/Remote-Terminal-for-MeshCore/blob/7151cf384650ca59abb2d0354156340f3c337b30/app/fanout/map_upload.py#L114 To this: ```python self._client = httpx.AsyncClient(timeout=httpx.Timeout(15.0), follow_redirects=True) ``` Fixes the issue and allows redirects. The log after the change: ``` Mar 29 12:52:01 phi uvicorn[367705]: 2026-03-29 12:52:01 - httpx - INFO - HTTP Request: POST https://map.meshcore.dev/api/v1/uploader/node "HTTP/1.1 307 Temporary Redirect" Mar 29 12:52:02 phi uvicorn[367705]: 2026-03-29 12:52:02 - httpx - INFO - HTTP Request: POST https://map.meshcore.io/api/v1/uploader/node "HTTP/1.1 200 OK" Mar 29 12:52:02 phi uvicorn[367705]: 2026-03-29 12:52:02 - app.fanout.map_upload - INFO - MapUpload: uploaded XXXXXXXX (repeater) → HTTP 200 ``` <!-- github-sync-id:4165114010 -->
adam closed this issue 2026-10-05 01:56:29 +02:00
Author
Owner

Thanks for the clear issue!

Thanks for the clear issue! <!-- github-comment-id:4152080044 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Remote-Terminal-for-MeshCore#81