Fossil SCM

Do a better response in the redirector if no matching artifact is found.

drh 2011-03-23 15:13 trunk
Commit dbc2098a6a089d02975f7c814cf5eaf149c6fd1d
1 file changed +6 -5
+6 -5
--- src/main.c
+++ src/main.c
@@ -1140,15 +1140,16 @@
11401140
}
11411141
}
11421142
if( zNotFound ){
11431143
cgi_redirectf(zNotFound, zName);
11441144
}else{
1145
- printf(
1146
- "Status: 200 Ok\r\n\r\n"
1147
- "<p>No such object: %s</p>\n",
1148
- zName
1149
- );
1145
+ @ <html>
1146
+ @ <head><title>No Such Object</title></head>
1147
+ @ <body>
1148
+ @ <p>No such object: <b>%h(zName)</b></p>
1149
+ @ </body>
1150
+ cgi_reply();
11501151
}
11511152
}
11521153
11531154
/*
11541155
** If g.argv[2] exists then it is either the name of a repository
11551156
--- src/main.c
+++ src/main.c
@@ -1140,15 +1140,16 @@
1140 }
1141 }
1142 if( zNotFound ){
1143 cgi_redirectf(zNotFound, zName);
1144 }else{
1145 printf(
1146 "Status: 200 Ok\r\n\r\n"
1147 "<p>No such object: %s</p>\n",
1148 zName
1149 );
 
1150 }
1151 }
1152
1153 /*
1154 ** If g.argv[2] exists then it is either the name of a repository
1155
--- src/main.c
+++ src/main.c
@@ -1140,15 +1140,16 @@
1140 }
1141 }
1142 if( zNotFound ){
1143 cgi_redirectf(zNotFound, zName);
1144 }else{
1145 @ <html>
1146 @ <head><title>No Such Object</title></head>
1147 @ <body>
1148 @ <p>No such object: <b>%h(zName)</b></p>
1149 @ </body>
1150 cgi_reply();
1151 }
1152 }
1153
1154 /*
1155 ** If g.argv[2] exists then it is either the name of a repository
1156

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button