Re: Double hostname in DLR URL
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Andreas, did you find anything? I never saw this on our side. Alex Am 27.07.2014 um 23:02 schrieb Andreas Fink <[email protected]>: > Hi folks, > > I run into a very puzzling issue with the delivery of DLRs from Kannel. > > I have a script which submits SMS to kannel. This script constructs a DLR URL like this: > > callback_url = octstr_format("http://%s:%d/sms/response.php?priority=%d", > octstr_get_cstr(callback_host), > (int)callback_port,ilm_prio); > further parameters added... > > callback_host and callback_port are Octstr read from the config file and are always constant. They do not contain spaces or any trailing tabs or the like > Then this URL is urlencoded and passed on to the URL which is sent to kannel. > Kannel is processing the request and comes back with a delivery report. > The hostname passed is a straight IP address not a DNS name. > > > This is the SMSBox Log on a DLR being sent back > > 2014-07-27 20:27:06 [16079] [10] DEBUG: Scheme: http:// > 2014-07-27 20:27:06 [16079] [10] DEBUG: Host: 10.195.198.70 > 2014-07-27 20:27:06 [16079] [10] DEBUG: Port: 80 > 2014-07-27 20:27:06 [16079] [10] DEBUG: Username: (null) > 2014-07-27 20:27:06 [16079] [10] DEBUG: Password: (null) > 2014-07-27 20:27:06 [16079] [10] DEBUG: Path: /sms/response.php > 2014-07-27 20:27:06 [16079] [10] DEBUG: Query: {some parameters...} > 2014-07-27 20:27:06 [16079] [10] DEBUG: Fragment: (null) > 2014-07-27 20:27:06 [16079] [10] DEBUG: HTTP: Reusing connection to `10.195.198.70:80' (fd=31). > 2014-07-27 20:27:06 [16079] [10] DEBUG: Socket connected at once > 2014-07-27 20:27:06 [16079] [10] DEBUG: HTTP: Sending request: > 2014-07-27 20:27:06 [16079] [10] DEBUG: Octet string at 0x7f9dd3b00050: > 2014-07-27 20:27:06 [16079] [10] DEBUG: len: 563 > 2014-07-27 20:27:06 [16079] [10] DEBUG: size: 1024 > 2014-07-27 20:27:06 [16079] [10] DEBUG: immutable: 0 > > > this is all correct so far and my script answers with a "OK" and everything's fine. > > > but then further down in the log I suddenly see this: > > > 2014-07-27 20:32:30 [16079] [10] DEBUG: Parsing URL `http://10.195.198.70, 10.195.198.70/sms/response.php?.... > 2014-07-27 20:31:03 [16079] [10] DEBUG: Scheme: http:// > 2014-07-27 20:31:03 [16079] [10] DEBUG: Host: 85.195.198.70, 85.195.198.70 > 2014-07-27 20:31:03 [16079] [10] DEBUG: Port: 80 > 2014-07-27 20:31:03 [16079] [10] DEBUG: Username: (null) > 2014-07-27 20:31:03 [16079] [10] DEBUG: Password: (null) > 2014-07-27 20:31:03 [16079] [10] DEBUG: Path: /sms/response.php > 2014-07-27 20:31:03 [16079] [10] DEBUG: Query: ... > 2014-07-27 20:31:03 [16079] [10] DEBUG: Fragment: (null) > 2014-07-27 20:31:03 [16079] [10] ERROR: gethostbyname failed > > As you can see here, the IP address of the host is now twice in the hostname and of course this is not resolvable. > I verified and I am 100% sure that I pass it only once, not twice. > And nothing changed between the first request and the second one. > Its still the same running instance of my code calling kannel. Its still passing the same DLR URL being passed. > Its still the same smsbox running. > > Has anyone seen such issues before? > Has there been any change in gwlib in regards to handling URL's? > > The version used is a SVN checkout from 24th of June. > > > >