Re: Send again due to delivery etiquette [Query about ipv4 connman web page]
Grant Erickson <[email protected]>
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <[email protected]> |
On Jan 5, 2025, at 6:12 PM, 이원영 <[email protected]> wrote: > > I am testing connman on Tizen platform with the following URLs "http://ipv4.connman.net/online/status.html" > > Result Status: 200 OK with empty body > As far as I remember, the response has body text in the response before. > > Could you check it? The 200 status with an empty body is correct, as follows: % curl -4 --verbose http://ipv4.connman.net/online/status.html * Host ipv4.connman.net:80 was resolved. * IPv6: (none) * IPv4: 212.227.81.55, 82.165.8.211 * Trying 212.227.81.55:80... * Connected to ipv4.connman.net (212.227.81.55) port 80 > GET /online/status.html HTTP/1.1 > Host: ipv4.connman.net > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/1.1 200 OK < Server: nginx < Date: Mon, 06 Jan 2025 15:43:48 GMT < Content-Type: text/html < Content-Length: 45 < Connection: close < X-ConnMan-Status: online < <html> <head> </head> <body> </body> </html> The key field that ConnMan indexes off of beyond the HTTP 200 response status to determine success is the custom header field "X-ConnMan-Status" with the value "online". If you'd like to perform your own tests with a custom URL using nginx, the following “server" block for /etc/nginx/sites-available/default on Ubuntu 20.04 has worked well for me: server { etag off; listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name _; location / { try_files $uri $uri/ =404; } location /online/status.html { max_ranges 0; add_header "X-ConnMan-Status" "online"; } } Best, Grant -- Principal Nuovations [email protected] https://www.nuovations.com/