Hello,
First off as always, thanks ahead of time!
I'm testing out the new http_query kamailio method/function, experiencing some odd behavior.
When I do: http://sub.domain.com/folder/1111111111 <- 1111111111 being a "file dynamically created", it may pull results i.e. "XYZ".
When I do: http://domain.com/test.txt <--- it may pull "XYZ", only the later method is being stored inside of the avp/var that I set on http_query.
I've tried everything from adjusting timeout, matching the end result in the first with second that http serves, etc. The first one is a result that is pulled dynamically, however the result is instantly rendered (no delay) so is essentially the same amount of time between the two methods. At this point the only difference I can see is the URI, one is on a subdomain, and one is not, and one has two 'forward /' slashes, vs the other only has one -- Any thoughts?
HTTP HEADERS --------------------------------------------- AVP RESULT IS NOT STORED:
T +2.695119 KAMAILIO:50254 -> APACHE_SERVER_1:80 [AP] GET /cnam/XXXXXXXXXX HTTP/1.1. Host: APACHE_SERVER_1. Accept: */*. .
T +0.077494 APACHE_SERVER:80 -> KAMAILIO:50254 [AP] HTTP/1.1 200 OK. Date: Fri, 24 Jul 2009 03:28:44 GMT. Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 PHP/ 5.2.9. X-Powered-By: PHP/5.2.9. Set-Cookie: PHPSESSID=73ab9eba6da2d51883d386bce2bb5967; path=/. Expires: Thu, 19 Nov 1981 08:52:00 GMT. Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0. Pragma: no-cache. Content-Length: 15. Content-Type: text/html. . Cell Phone CA
AVP RESULT IS APPROPRIATELY STORED:
T +5.883544 KAMAILIO:34652 -> APACHE_SERVER_2:80 [AP] GET /test.txt HTTP/1.1. Host: APACHE_SERVER_2. Accept: */*. .
T +0.002655 APACHE_SERVER_2:80 -> KAMAILIO:34652 [AP] HTTP/1.1 200 OK. Date: Fri, 24 Jul 2009 03:29:14 GMT. Server: Apache/2.2.11 (Unix) PHP/5.2.9. Last-Modified: Fri, 24 Jul 2009 03:14:54 GMT. ETag: "11a117-10-46f6b0215a780". Accept-Ranges: bytes. Content-Length: 16. Content-Type: text/plain. . Cell Phone CA
Brandon Armstead writes:
AVP RESULT IS NOT STORED:
Content-Length: 15. Content-Type: text/html. . Cell Phone CA
looks like there is no new line in the body. http_query stores "first line" of body to result param. if body does not cntaind a newline there is no line and nothing is stored.
i'll try to mane this clearer in README.
-- juha
Juha Heinanen schrieb:
Brandon Armstead writes:
AVP RESULT IS NOT STORED:
Content-Length: 15. Content-Type: text/html. . Cell Phone CA
looks like there is no new line in the body. http_query stores "first line" of body to result param. if body does not cntaind a newline there is no line and nothing is stored.
i'll try to mane this clearer in README.
Why not storing it even without newline?
regards klaus
Juha Heinanen schrieb:
Klaus Darilion writes:
Why not storing it even without newline?
storing what, the whole body as is? the idea was that the result can be used as is as an uri without a need to strip newline.
I meant:
if body is multiline, use the first line (as it is at the moment)
if body is only a single line, accept this single line also if linefeed is missing
regards klaus