Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4785346
By: merchantman
Okay, I think I've figured it out. The problem has nothing whatsoever to do
with what I thought it did. The cache file updating works fine. However, IP
address is only added to the %config hash when the update process succeeds.
The problem is actually that it never succeeded; the 'IP=' issue was just a
symptom of this.
I should learn to read the documentation more carefully. For some reason I
thought I was using -verbose when in actuality I was not. Apparently, my updates
requests were being rejected by DynDNS's update server because the Authorization
string was being broken into two lines. Yes, I do have a ridiculously large
password of 63 characters which was causing the line (with "Authorization: Basic
" prepended) to exceed 76 characters. When presented with this, DynDNS sends
back a 400 Bad Request error similar to this (imagine that the XXXXX contains
the chopped off piece of my auth string):
RECEIVE: HTTP/1.1 400 Bad Request
RECEIVE: Date: Mon, 18 Feb 2008 18:46:18 GMT
RECEIVE: Server: Apache
RECEIVE: Content-Length: 312
RECEIVE: Connection: close
RECEIVE: Content-Type: text/html; charset=iso-8859-1
RECEIVE:
RECEIVE: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
RECEIVE: <html><head>
RECEIVE: <title>400 Bad Request</title>
RECEIVE: </head><body>
RECEIVE: <h1>Bad Request</h1>
RECEIVE: <p>Your browser sent a request that this server could not understand.<br
/>
RECEIVE: Request header field is missing ':' separator.<br />
RECEIVE: <pre>
RECEIVE: XXXXXXXXXXXXXXXXXXXX</pre>
RECEIVE: </p>
RECEIVE: </body></html>
If I change the code according to the patch at http://ddclient.pastebin.ca/908785,
DynDNS does not send me the error, my IP address is updated correctly and written
to the cache file, and peace and harmony are restored to the universe.
I did discover one other thing. My ridiculous password was randomly generated
and contained a '\' character. This was lost when ddclient read the password
from the configuration file (it was probably interpreted as an escape); I had
to add an additional '\' to keep it from being destroyed. It seems like the
code is making an effort to protect '#' characters in passwords so I think it
would be a good idea to protect some other characters as well. That or at least
make a note in the documentation of what characters are protected or not.
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=399428
|