Prusa-Link-Web icon indicating copy to clipboard operation
Prusa-Link-Web copied to clipboard

[BUG] wget: Prusalink needs to athenticate twice

Open emc02 opened this issue 5 months ago • 0 comments

I found this issue on trying to get data to visualize it with my Loxone SmartHome. Any attempt to get data from PrusaLink API failed, except for retrieving the the index.html.

Example wget to api wget http://maker:password@192.168.1.192/api/job --2024-09-11 14:20:17-- http://maker:password@192.168.1.192/api/job Connecting to 192.168.1.192:80... connected. HTTP request sent, awaiting response... 401 Unauthorized Authentication selected: Digest realm="Printer API", nonce="33e1737e000065bd", stale=false Reusing existing connection to 192.168.1.192:80. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/json] Saving to: 'job.2'

Example wget to index.html wget http://maker:password@192.168.1.192 --2024-09-11 14:20:30-- http://maker:password@192.168.1.192/ Connecting to 192.168.1.192:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7211 (7.0K) [text/html] Saving to: 'index.html.1'

This issue is maybe related to #3287 and other duplicates of it.

On normal browser this does not matter, because it retries and on second attempt it's working. Unfortunately Loxone is only trying once and therefore it fails everytime. But I think it's a bug in Prusa-Link.

Thanks in advance!

emc02 avatar Sep 11 '24 12:09 emc02