Curl

Themen auf die es innerhalb eines Jahres keine Antwort gab, werden hier archiviert.

Moderatoren: Cyrelian, seppy, udo1toni

Gesperrt
ThomyTP
Beiträge: 41
Registriert: 8. Jan 2018 19:13
Answers: 1

Curl

Beitrag von ThomyTP »

Hallo,
ich habe wie ja bekannt meinen Openhab von Strech auf Buster hochgezogen.
Eine Funktion habe ich immer noch nicht hinbekommen...

Ich lade von einer Wansview Cam das akutelle Foto beim Klingeln und schicke es mir per telegram. Soweit so gut.

Unter Strech, Curl Version 7.38.0 klappt das auch super.
Der gleiche Aufruf unter buster, Curl Version 7.64 klappt es nicht.

Kennt jemand solche Probleme mit Curl?? Ich bekomme nur eine Datei mit 0kb

Dank euch..



Der Aufruf im Script erfolgt mit
curl --silent --connect-timeout 10 --digest --max-time 10 --user User:pass -o "/etc/openhab2/scripts/door.jpg" 192.168.111.65/mjpeg/snap.cgi?/&chn=1

Meldung 7.38 in Verbose Mode
Server auth using Digest with user 'user'
> GET /mjpeg/snap.cgi?/ HTTP/1.1
> User-Agent: curl/7.38.0
> Host: 192.168.111.65
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Digest realm="IPCamera Login", nonce="6e35a3a93f5d598caa7447b775de07f6", qop="auth"
< Content-Type: text/html
< Content-Length: 351
< Date: Sun, 23 Aug 2020 16:09:36 GMT
* Server lighttpd/1.4.35 is not blacklisted
< Server: lighttpd/1.4.35
<
* Ignoring the response-body
{ [data not shown]
100   351  100   351    0     0  14613      0 --:--:-- --:--:-- --:--:-- 15260
* Connection #0 to host 192.168.111.65 left intact
* Issue another request to this URL: 'HTTP://192.168.111.65/mjpeg/snap.cgi?/'
* Found bundle for host 192.168.111.65: 0x5560a3f0
* Re-using existing connection! (#0) with host 192.168.111.65
* Connected to 192.168.111.65 (192.168.111.65) port 80 (#0)
* Server auth using Digest with user 'user'
> GET /mjpeg/snap.cgi?/ HTTP/1.1
> Authorization: Digest username="user", realm="IPCamera Login", nonce="6e35a3a93f5d598caa7447b775de07f6", uri="/mjpeg/snap.cgi?/", cnonce="YjgzYWI0NjI2M2NkNWQ3MzE4NTJiN2EwY2M5MTEzMTc=", nc=00000001, qop=auth, response="d367f7a6a2867dfe3ee44899a116ccd5"
> User-Agent: curl/7.38.0
> Host: 192.168.111.65
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: image/jpeg
< Content-Length: 140752
< Date: Sun, 23 Aug 2020 16:09:36 GMT
* Server lighttpd/1.4.35 is not blacklisted
< Server: lighttpd/1.4.35
<
{ [data not shown]
100  137k  100  137k    0     0   423k      0 --:--:-- --:--:-- --:--:-- 1622k
* Connection #0 to host 192.168.111.65 left intact
^C
[1]+  Done                    curl --verbose --connect-timeout 10 --digest --max-time 10 --user user:pass -o "/etc/openhab2/scripts/door.jpg" 192.168.111.65/mjpeg/snap.cgi?/

Bei 7.64 sieht das gleiche Script so aus: (mit Übergabe User Agend)

* Expire in 0 ms for 6 (transfer 0x144a880)
* Expire in 10000 ms for 8 (transfer 0x144a880)
* Expire in 15000 ms for 2 (transfer 0x144a880)
* Trying 192.168.111.65...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x144a880)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 192.168.111.65 (192.168.111.65) port 80 (#0)
* Server auth using Digest with user 'user'
> GET /mjpeg/snap.cgi?chn=1 HTTP/1.1
> Host: 192.168.111.65
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 Edg/84.0.522.63
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Digest realm="IPCamera Login", nonce="f7f00f19556e5e264a8ea28ef369df76", qop="auth"
< Content-Type: text/html
< Content-Length: 351
< Date: Sun, 23 Aug 2020 16:30:52 GMT
< Server: lighttpd/1.4.35
<
* Ignoring the response-body
{ [351 bytes data]
100 351 100 351 0 0 5754 0 --:--:-- --:--:-- --:--:-- 5850
* Connection #0 to host 192.168.111.65 left intact
* Issue another request to this URL: 'http://user:pass@192.168.111.65/mjpeg/1 ... .cgi?chn=1'
* Expire in 10000 ms for 8 (transfer 0x144a880)
* Expire in 15000 ms for 2 (transfer 0x144a880)
* Found bundle for host 192.168.111.65: 0x144cd20 [can pipeline]
* Could pipeline, but not asked to!
* Re-using existing connection! (#0) with host 192.168.111.65
* Connected to 192.168.111.65 (192.168.111.65) port 80 (#0)
* Expire in 0 ms for 6 (transfer 0x144a880)
* Server auth using Digest with user 'user'
> GET /mjpeg/192.168.111.65/mjpeg/snap.cgi?chn=1 HTTP/1.1
> Host: 192.168.111.65
> Authorization: Digest username="user", realm="IPCamera Login", nonce="f7f00f19556e5e264a8ea28ef369df76", uri="/mjpeg/192.168.111.65/mjpeg/snap.cgi?chn=1", cnonce="ZWY1OGNhYTViYmFjNGQyNjQ4MzcyMTA4ZjAxNDE5Mjc=", nc=00000001, qop=auth, response="7d6f328ceab53753f2d2038ae89e6842"
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 Edg/84.0.522.63
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 0
< Date: Sun, 23 Aug 2020 16:30:52 GMT
< Server: lighttpd/1.4.35
<
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

Gesperrt