I found what I think is a problem with the HTTP library and I can not find a solution.
I use:
DynamicC10.72C (But the problem happens with all versions)
RCM6760
Description:
-
I use the “\Samples cpip\http\CGI.C”
-
I define a Static IP like this:
#define _PRIMARY_STATIC_IP “192.168.1.199”
#define _PRIMARY_NETMASK “255.255.255.0”
#define MY_NAMESERVER “192.168.1.254”
#define MY_GATEWAY “192.168.1.254” -
In my Internet Router i define a “Port Redirection” in NAT to the the defined IP.
-
Now I can access the “CGI.C” sample webpage from outside world.
-
The problem starts when i have a wrong Gateway like this:
#define _PRIMARY_STATIC_IP “192.168.1.199”
#define _PRIMARY_NETMASK “255.255.255.0”
#define MY_NAMESERVER “192.168.1.1”
#define MY_GATEWAY “192.168.1.1” -
Attention, the “192.168.1.1” IP does not exist in the Local Network.
-
If i first call the “192.168.1.199” in webbrowser the the sample page
loads without problems. -
If i call the External address to access the page from the Internet the
sample page will not open and it’s normal because the gateway is wrong. -
Now if I try to open again the “192.168.1.1” IP in the Local Network,
the webpage will not open.
The HTTP library seems to be somehow blocked by incoming requests that
can not be forwarded to the wrong gateway. -
Just putting the correct gateway could solve the problem, but when for some reason,
the library can not send the packages to the correct gateway it stops accepting
more requests, which is a problem and happens regularly.
Anyone have any idea how to solve this problem?
Thanks,
Luís Silva