Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Skylark and SCGI
Re: Skylark and SCGI [message #40272 is a reply to message #40270] Sun, 14 July 2013 14:35 Go to previous messageGo to previous message
mdelfede is currently offline  mdelfede
Messages: 1310
Registered: September 2007
Ultimate Contributor
More findings: in Http::Finalize()
void Http::Finalize()
{
	if(rsocket) {
		SKYLARKLOG("=== Response: " << code << ' ' << code_text);
		String r;
		if(redirect.GetCount()) {
			SKYLARKLOG("Redirect to: " << redirect);
			r << "HTTP/1.1 " << code << " Found\r\n";
			r << "Location: " << redirect << "\r\n";
			for(int i = 0; i < cookies.GetCount(); i++)
				r << cookies[i];
		}
		else {
			r <<
				"HTTP/1.1 " << code << ' ' << code_text << "\r\n"
				"Date: " <<  WwwFormat(GetUtcTime()) << "\r\n"
				"Content-Length: " << response.GetCount() << "\r\n"
				"Content-Type: " << content_type << "\r\n";
			for(int i = 0; i < headers.GetCount(); i++)
				r << headers.GetKey(i) << ": " << headers[i] << "\r\n";
			for(int i = 0; i < cookies.GetCount(); i++)
				r << cookies[i];
			r << "\r\n";
		}
		rsocket->PutAll(r);
		rsocket->PutAll(response);
		rsocket = NULL;
	}
}


The 'code_text' string, which should be 'OK', is empty, and the 'r' string is missing the 'Status :' part.
So, the first line sent to browser is
200

instead of
Status : 200 OK


I don't know how is SCGI related.....

Max
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SSL sockets example
Next Topic: Probable bug in Skylark and sessions
Goto Forum:
  


Current Time: Wed Aug 27 23:52:10 CEST 2025

Total time taken to generate the page: 0.06434 seconds