0

I have sent 2 servlet requests to my G-WAN server:

domain.com/?cspA  
127.0.0.8:8888/?cspB  

By changing query character to '#', I want to temporay block all servlets. After a while, I want to switch back to '?'.

But the servlet cspB on 127.0..:8888 is not conforming to this scenario. It works even when the query char has been set to '#'.

The cspA servlet works owerver: it cannot be accessed.

What happens?

u8 *query_char = (u8*)get_env(argv, QUERY_CHAR);
*query_char = '#';

// do something for a while...

// restore the query character
*query_char = '?';

I am using G-WAN v4. 3.14, ubuntu 12.04 latest updated.

Gil
  • 3,279
  • 1
  • 15
  • 25
k.k. lou
  • 1,805
  • 2
  • 13
  • 16

1 Answers1

1

changing of query char has no effect

Not exactly true as you have successfully changed it to '#' (from the default '?').

What you want to do is rather to dynamically change the query character while the server is running.

I can't check how the feature is implemented (we are Sunday) but this might just be a matter of waiting that the current TCP connection is closed (or to fire a new TCP connection).

If I remember well, the global query character is copied in the connection context and therefore will last for the connection lifetime (which can process several consecutive HTTP requests, until the connection times-out).

This would explain why it works with two different IP endpoints: each requires a separate TCP connection.

Hope this clears this mystery.

Gil
  • 3,279
  • 1
  • 15
  • 25