HttpReceiveHttpRequest() not working as expected

Questions about Wine on Linux
Locked
k7_dav_hos
Newbie
Newbie
Posts: 2
Joined: Mon Jun 01, 2020 1:03 am

HttpReceiveHttpRequest() not working as expected

Post by k7_dav_hos »

Hi All

We have been evaluating Wine to run our working win32 HTTP Server application on Linux.

The application was running but failed to respond to a http request.

To corner down the issue we used a sample application that will listen on port for a http request and send a response. It is working fine in windows but not in Wine.

For Example:
When I run the program in Windows, it will start listening on the given URL in argument. When a request is made (either via curl or browser) it will respond with the string "Hey! You hit the server.Returning...." and the listening program will print the string "!!!!!!Got a GET request for http://localhost:7090/" in the console.

Our observation is that the given port is listening as expected. (Seen using netstat -a). We suspect that there could be a bug or a configuration issue in the method HttpReceiveHttpRequest() or any other dependent method.

The source code and the test program is attached for your reference. (The code is referred from https://docs.microsoft.com/en-us/window ... pplication)

Use the below command to test our sample application
$ wine httptest.exe http://+:7090/

Our test environment:
OS: Ubuntu 20.04
Wine: version-5.0; WINEARCH=win32
Windows Application: x86

Please let us know if any one has already faced the similar problem or help us out in fixing the same.

regards,
David.
Attachments
sampleapp.zip
sample http test application
(10.81 KiB) Downloaded 93 times
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: HttpReceiveHttpRequest() not working as expected

Post by jkfloris »

The sample app works as you describes if I run:

Code: Select all

wine httptest.exe http://127.0.0.1:7090/
or
wine httptest.exe http://localhost:7090/
k7_dav_hos
Newbie
Newbie
Posts: 2
Joined: Mon Jun 01, 2020 1:03 am

Re: HttpReceiveHttpRequest() not working as expected

Post by k7_dav_hos »

Thanks for your comment. Yes this works when we specify single IP or host name.

However our application needs to work across IPs hence we need http://+:7090/ also to work as it works in windows. Any idea if wine supports this and any difference in syntax.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: HttpReceiveHttpRequest() not working as expected

Post by jkfloris »

If I run the sample app with Wine-staging 5.9, it works as expected.
Locked