comparison src/c/static.c @ 2162:c39c48696393

Allow returnBlob and redirect in static protocol Both of these functions end up returning RETURN_INDIRECTLY, which is assumed to be an error by static.c's main. Treat it as success instead.
author Julian Squires <julian@cipht.net>
date Mon, 13 Jul 2015 14:34:30 -0400
parents 8ecbd1100227
children
comparison
equal deleted inserted replaced
2161:af3f5b58aed2 2162:c39c48696393
35 uw_initialize(ctx); 35 uw_initialize(ctx);
36 36
37 while (1) { 37 while (1) {
38 fk = uw_begin(ctx, argv[1]); 38 fk = uw_begin(ctx, argv[1]);
39 39
40 if (fk == SUCCESS) { 40 if (fk == SUCCESS || fk == RETURN_INDIRECTLY) {
41 uw_print(ctx, 1); 41 uw_print(ctx, 1);
42 puts(""); 42 puts("");
43 return 0; 43 return 0;
44 } else if (fk != UNLIMITED_RETRY) { 44 } else if (fk != UNLIMITED_RETRY) {
45 fprintf(stderr, "Error: %s\n", uw_error_message(ctx)); 45 fprintf(stderr, "Error: %s\n", uw_error_message(ctx));