summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Action.cc2
-rw-r--r--lib/CopyJob.cc6
-rw-r--r--lib/HttpServ.cc20
-rw-r--r--lib/Menu.cc6
4 files changed, 18 insertions, 16 deletions
diff --git a/lib/Action.cc b/lib/Action.cc
index 292e669..d7e8314 100644
--- a/lib/Action.cc
+++ b/lib/Action.cc
@@ -33,7 +33,9 @@ Action::~Action() {
Action * Action::Look4URL(const String & URL) {
Action * p;
+// cerr << "Looking for " << URL << endl;
for (p = start; p; p = p->next) {
+// cerr << "p->GetURL() = " << p->GetURL() << endl;
if (!p->GetURL().strlen()) {
// Si l'action que l'on vient de tester n'a pas d'URL, elle ne sert ŕ rien.
// On l'efface donc de notre liste. GetURL renvoie une chaine vide si l'action
diff --git a/lib/CopyJob.cc b/lib/CopyJob.cc
index 877b113..524a52c 100644
--- a/lib/CopyJob.cc
+++ b/lib/CopyJob.cc
@@ -26,9 +26,9 @@ int CopyJob::Do() throw (GeneralException) {
tr = siz >= 0 ? siz - cursiz : COPY_BUFSIZ;
try {
r = s->read(buffer, MIN(COPY_BUFSIZ, tr));
- cerr << "CopyJob: read " << r << " bytes: " << endl;
- buffer[r] = 0;
- cerr << buffer << endl;
+// cerr << "CopyJob: read " << r << " bytes: " << endl;
+// buffer[r] = 0;
+// cerr << buffer << endl;
}
catch (IOAgain e) {
WaitFor(s, W4_READING);
diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc
index 1e37f94..d2c3c02 100644
--- a/lib/HttpServ.cc
+++ b/lib/HttpServ.cc
@@ -60,7 +60,7 @@ int ProcessRequest::Do() {
bad = false;
- cerr << "---- Got a request from handle " << s.GetHandle() << " \n";
+// cerr << "---- Got a request from handle " << s.GetHandle() << " \n";
post = ParseUri(file, domain, &b);
@@ -70,7 +70,7 @@ int ProcessRequest::Do() {
do {
int p;
b >> t;
- cerr << "Read Request (n): " << t << endl;
+// cerr << "Read Request (n): " << t << endl;
if ((t.strstr("Content-Length: ") == 0) || (t.strstr("Content-length: ") == 0)) {
// cerr << "Saw 'Content-Lenght:', reading length from '" << t.extract(16) << "'\n";
len = t.extract(16).to_int();
@@ -87,7 +87,7 @@ int ProcessRequest::Do() {
}
} while (t.strlen());
- cerr << "---- Processing it.\n";
+// cerr << "---- Processing it.\n";
hasvars = false;
@@ -122,7 +122,7 @@ int ProcessRequest::Do() {
ParseVars(&b, len);
}
- cerr << " Domain = '" << domain << "' - File = '" << file << "'\n";
+// cerr << " Domain = '" << domain << "' - File = '" << file << "'\n";
if (!bad) {
// Nous vérifions le domaine.
@@ -167,11 +167,11 @@ int ProcessRequest::Do() {
SendHeads(&b, GetMime(file), String("Accept-Ranges: bytes") + endhl + "Content-Length: " + (unsigned long long int) i->GetSize() + endhl, i->GetModif());
i->SetNonBlock();
a = new CopyJob(i, &s);
- cerr << "File found, dumping.\n";
+// cerr << "File found, dumping.\n";
}
catch (IOGeneral e) {
ShowError(&b);
- cerr << "File not found, error showed.\n";
+// cerr << "File not found, error showed.\n";
}
}
}
@@ -180,7 +180,7 @@ int ProcessRequest::Do() {
delete Vars;
delete Heads;
- cerr << "---- Sending header buffer.\n";
+// cerr << "---- Sending header buffer.\n";
c = new CopyJob(&b, &s, -1, false);
WaitFor(c);
current = 3;
@@ -190,7 +190,7 @@ int ProcessRequest::Do() {
delete c;
if (a) {
- cerr << "---- Sending contents.\n";
+// cerr << "---- Sending contents.\n";
a->Restart();
WaitFor(a);
current = 4;
@@ -199,7 +199,7 @@ int ProcessRequest::Do() {
case 4:
if (a) delete a;
- cerr << "---- End of Request.\n";
+// cerr << "---- End of Request.\n";
}
return TASK_DONE;
}
@@ -271,7 +271,7 @@ bool ProcessRequest::ParseUri(String & file, String & domain, Handle * s) {
ssize_t sppos;
*s >> t;
- cerr << "Read Request (1): " << t << endl;
+// cerr << "Read Request (1): " << t << endl;
bad = false;
diff --git a/lib/Menu.cc b/lib/Menu.cc
index f730e5b..05d7088 100644
--- a/lib/Menu.cc
+++ b/lib/Menu.cc
@@ -15,9 +15,9 @@ Task * Menu::Do(Variables * v, Variables *, Handle * h) {
SendHead(b);
(*b) << "<center><TABLE BORDER=0>" << endnl;
for (i = 0; i < nba; i++) {
- (*b) << "<TR BGCOLOR=\"#" << (f ? "dddddd" : "cccccc") << "\"><TD ALIGN=\"center\">" << (i + 1) << "</TD><TD>"
- "<A HREF=\"/bin/" << (la[i] ? la[i]->GetURL() : "start") << "\">"
- << lt[i] << "</A></TD></TR>" << endnl;
+ (*b) << "<TR BGCOLOR=\"#" << (f ? "dddddd" : "cccccc") << "\"><TD ALIGN=\"center\">" << (i + 1) << "</TD><TD>";
+ (*b) << "<A HREF=\"/bin/" << (la[i] ? la[i]->GetURL() : "start") << "\">";
+ (*b) << lt[i] << "</A></TD></TR>" << endnl;
f = f ? 0 : 1;
}
(*b) << "</TABLE></center>" << endnl;