grahams (grahams) wrote in lj_dev,
grahams
grahams
lj_dev

  • Mood:
  • Music:

Could someone help me un-gimp my code?

Mystically, a few weeks ago, my BeOS LJ client stopped working... I haven't had much time to work on it until now, and I have looked back a bit in lj_dev to look for the answer, but have yet found it... I _think_ the text I am sending to the lj server is correct, but perhaps I am just a total gimp... :)




//Formating Text
string content, header;
content = "user=";
content += EncodeString(current_username);
content += "&password=";
content += EncodeString(current_password);
content += "&clientversion=";
content += EncodeString(CLIENT_VERSION);
content += "&";
content += cmd;

bool use_proxy = false;
SettingsWindow->settings->FindBool("use_proxy", &use_proxy);

if( use_proxy ) {
header = "POST http://";
header += SERVER_ADDRESS;
header += "/cgi-bin/log.cgi HTTP/1.0\r\n";
}
else {
header = "POST /cgi-bin/log.cgi HTTP/1.0\r\n";
}

header += "Host: ";
header += SERVER_ADDRESS;
header += "\r\n";


sprintf( str_len, "%ld", content.length() );

header += "Content-length: ";
header += str_len;
header += "\r\n";

header += "Content-type: multipart/form-data\r\n\r\n";
header += content;
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 6 comments