Skip to content

Empty reply from server using mDNS_Web_Server #2902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 of 6 tasks
pmalhaire opened this issue Jun 18, 2019 · 2 comments
Closed
5 of 6 tasks

Empty reply from server using mDNS_Web_Server #2902

pmalhaire opened this issue Jun 18, 2019 · 2 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@pmalhaire
Copy link
Contributor

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [ESP-32]
  • Core Version: [l]
  • Development Env: [Arduino IDE]
  • Operating System: [Archlinux]

Settings in IDE

  • Module: [Nodemcu]
  • Flash Mode: [qio|dio|other]
  • Flash Size: [4MB/1MB]
  • lwip Variant: [v1.4|v2 Lower Memory|Higher Bandwidth]
  • Reset Method: [ck|nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [160MHz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200] (serial upload only)

Problem Description

When using mDNS_Web_Server

I got an empty reply from server

curl -v "http://esp32.local/"
*   Trying 192.168.1.23...
* TCP_NODELAY set
* Connected to esp32.local (192.168.1.23) port 80 (#0)
> GET / HTTP/1.1
> Host: esp32.local
> User-Agent: curl/7.64.1
> Accept: */*
> 
* Empty reply from server
* Connection #0 to host esp32.local left intact
curl: (52) Empty reply from server
* Closing connection 0

If I remove the client.flush() call here https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266mDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino#L106
and add a client.stop() at the end of the loop.
all is working fine.

curl -v "http://esp32.local/"
*   Trying 192.168.1.23...
* TCP_NODELAY set
* Connected to esp32.local (192.168.1.23) port 80 (#0)
> GET / HTTP/1.1
> Host: esp32.local
> User-Agent: curl/7.64.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: text/html
* no chunk, no close, no size. Assume close to signal end
< 
<!DOCTYPE HTML>
<html>Hello from ESP32 at 192.168.1.23</html>

* Closing connection 0

I am not sure if it's a bug or not but it seems legit to me not to flush the client and just stop the connection.

pmalhaire added a commit to pmalhaire/arduino-esp32 that referenced this issue Jun 18, 2019
The flush causes an empty response a client side.

see espressif#2902
me-no-dev pushed a commit that referenced this issue Jul 9, 2019
The flush causes an empty response a client side.

see #2902
@stale
Copy link

stale bot commented Aug 17, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 17, 2019
@pmalhaire
Copy link
Contributor Author

The fix has been merged

turmary pushed a commit to Seeed-Studio/Seeed_Arduino_atmDNS that referenced this issue Jan 14, 2020
The flush causes an empty response a client side.

see espressif/arduino-esp32#2902
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

1 participant