Commit Diff


commit - c56af3fdaec8a156f341675b6781966a74456c9f
commit + 8f214b627d8d732248d5ae12b5c1de0c3ba3c6a7
blob - 879b0a913a62323f001d8b8245806a28ce537bd6
blob + 866c545e0c71a0fbc9ed80524c4b3f676cdd2dd8
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -1702,8 +1702,7 @@ gw_parse_querystring(struct gw_trans *gw_trans)
 	unsigned int i;
 
 	if (gw_trans->gw_req->fieldnmap[0]) {
-		error = got_error_from_errno("bad parse");
-		return error;
+		return got_error(GOT_ERR_QUERYSTRING);
 	} else if ((p = gw_trans->gw_req->fieldmap[KEY_PATH])) {
 		/* define gw_trans->repo_path */
 		gw_trans->repo_name = p->parsed.s;
@@ -1727,7 +1726,9 @@ gw_parse_querystring(struct gw_trans *gw_trans)
 		}
 		if (gw_trans->action == -1) {
 			gw_trans->action = GW_ERR;
-			gw_trans->error = got_error_from_errno("bad action");
+			gw_trans->error = got_error_msg(GOT_ERR_QUERYSTRING,
+			    p != NULL ? "bad action in querystring" :
+			    "no action in querystring");
 			return error;
 		}