Skip to content

Commit

Permalink
added HTTP_RESPONSE_STATUS to ASCII_STR transcoder wip #109
Browse files Browse the repository at this point in the history
  • Loading branch information
zippy committed May 13, 2016
1 parent 3fa219f commit 602c66f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 9 deletions.
7 changes: 7 additions & 0 deletions doxy/sys_defs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3748,6 +3748,13 @@ <h4>INTERNET_CONTEXT</h4>
<div class="def-sym-def"><a href="ref_sys_structures.html#LIST_OF_HTTP_RESPONSE_STATUS_AND_HTTP_HEADERS_AND_HTTP_RESPONSE_BODY">LIST-OF-HTTP-RESPONSE-STATUS-AND-HTTP-HEADERS-AND-HTTP-RESPONSE-BODY</a></div>
<div class="def-comment"></div>
</div>
<div class="def-item def-process">
<div class="def-type">Process:</div>
<div class="def-name"><a name=" http_response_status_2_ascii_str"></a> http_response_status_2_ascii_str</div>
<div class="def-sig-in"><li>input(SYMBOL:<a href="ref_sys_symbols.html#HTTP_RESPONSE_STATUS">HTTP_RESPONSE_STATUS</a>)</li></div>
<div class="def-sig-out">output(SYMBOL:<a href="ref_sys_symbols.html#ASCII_STR">ASCII_STR</a>)</div>
<div class="def-comment"><i>http response status transcoder</i></div>
</div>
<div class="def-item def-process">
<div class="def-type">Process:</div>
<div class="def-name"><a name="http_response_2_lines"></a>http_response_2_lines</div>
Expand Down
1 change: 1 addition & 0 deletions doxy/sys_processes.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<tr><td><a name="echo2stream"></a>echo2stream</td><td><ol><li>stream(SYMBOL:<a href="ref_sys_symbols.html#EDGE_STREAM">EDGE_STREAM</a>)</li><li>value(ANY:<a href="ref_sys_symbols.html#NULL_STRUCTURE">NULL_STRUCTURE</a>)</li></ol></td><td>result(SYMBOL:<a href="ref_sys_symbols.html#NULL_SYMBOL">NULL_SYMBOL</a>)</td><td><i>echo input to stream</i></td></tr>
<tr><td><a name="meda_type_2_ascii_str"></a>meda_type_2_ascii_str</td><td><ol><li>input(STRUCTURE:<a href="ref_sys_symbols.html#MEDIA_TYPE">MEDIA_TYPE</a>)</li></ol></td><td>output(SYMBOL:<a href="ref_sys_symbols.html#ASCII_STR">ASCII_STR</a>)</td><td><i>media type transcoder</i></td></tr>
<tr><td><a name="content_type_2_line"></a>content_type_2_line</td><td><ol><li>input(SYMBOL:<a href="ref_sys_symbols.html#CONTENT_TYPE">CONTENT_TYPE</a>)</li></ol></td><td>output(SYMBOL:<a href="ref_sys_symbols.html#LINE">LINE</a>)</td><td><i>content type transcoder</i></td></tr>
<tr><td><a name=" http_response_status_2_ascii_str"></a> http_response_status_2_ascii_str</td><td><ol><li>input(SYMBOL:<a href="ref_sys_symbols.html#HTTP_RESPONSE_STATUS">HTTP_RESPONSE_STATUS</a>)</li></ol></td><td>output(SYMBOL:<a href="ref_sys_symbols.html#ASCII_STR">ASCII_STR</a>)</td><td><i>http response status transcoder</i></td></tr>
<tr><td><a name="http_response_2_lines"></a>http_response_2_lines</td><td><ol><li>input(SYMBOL:<a href="ref_sys_symbols.html#HTTP_RESPONSE">HTTP_RESPONSE</a>)</li></ol></td><td>output(SYMBOL:<a href="ref_sys_symbols.html#LINES">LINES</a>)</td><td><i>http response transcoder</i></td></tr>
<tr><td><a name="line_2_httpreq"></a>line_2_httpreq</td><td><ol></ol></td><td>signal id(SYMBOL:<a href="ref_sys_symbols.html#SIGNAL_UUID">SIGNAL_UUID</a>)</td><td><i>parse an HTTP_REQUEST from a LINE</i></td></tr>
<tr><td><a name="ascii_chars_2_http_req"></a>ascii_chars_2_http_req</td><td><ol><li>input(SYMBOL:<a href="ref_sys_symbols.html#ASCII_CHARS">ASCII_CHARS</a>)</li></ol></td><td>output(SYMBOL:<a href="ref_sys_symbols.html#HTTP_REQUEST">HTTP_REQUEST</a>)</td><td><i>http req transcoder</i></td></tr>
Expand Down
13 changes: 6 additions & 7 deletions spec/http_example.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@ void testHTTPprotocol() {
T *t = _o_unwrap(G_sem,http,sem_map);
// and also check how it gets unwrapped because it's defined in terms of REQUESTING
// @todo, how come HTTP_SERVER and the two handler goals aren't added to the semantics?
spec_is_str_equal(t2s(t),"(PROTOCOL_DEFINITION (PROTOCOL_LABEL (ENGLISH_LABEL:HTTP)) (PROTOCOL_SEMANTICS (GOAL:HTTP_REQUEST_HANDLER) (ROLE:HTTP_CLIENT)) (backnforth (INITIATE (ROLE:HTTP_CLIENT) (DESTINATION (ROLE:HTTP_SERVER)) (ACTION:send_request)) (EXPECT (ROLE:HTTP_SERVER) (SOURCE (ROLE:HTTP_CLIENT)) (PATTERN (SEMTREX_SYMBOL_LITERAL (SEMTREX_SYMBOL:HTTP_REQUEST))) (ACTION:send_response))))");
spec_is_str_equal(t2s(t),"(PROTOCOL_DEFINITION (PROTOCOL_LABEL (ENGLISH_LABEL:HTTP)) (PROTOCOL_SEMANTICS (GOAL:HTTP_REQUEST_HANDLER) (ROLE:HTTP_CLIENT) (USAGE:RESPONSE_HANDLER_PARAMETERS)) (PROTOCOL_DEFAULTS (SEMANTIC_LINK (USAGE:RESPONSE_HANDLER_PARAMETERS) (REPLACEMENT_VALUE (NULL_SYMBOL)))) (backnforth (INITIATE (ROLE:HTTP_CLIENT) (DESTINATION (ROLE:HTTP_SERVER)) (ACTION:send_request)) (EXPECT (ROLE:HTTP_SERVER) (SOURCE (ROLE:HTTP_CLIENT)) (PATTERN (SEMTREX_SYMBOL_LITERAL (SEMTREX_SYMBOL:HTTP_REQUEST))) (ACTION:send_response))))");

// the unwrapping should build up a semantic map
spec_is_str_equal(t2s(sem_map),"(SEMANTIC_MAP (SEMANTIC_LINK (ROLE:REQUESTER) (REPLACEMENT_VALUE (ROLE:HTTP_CLIENT))) (SEMANTIC_LINK (ROLE:RESPONDER) (REPLACEMENT_VALUE (ROLE:HTTP_SERVER))) (SEMANTIC_LINK (USAGE:REQUEST_TYPE (REPLACEMENT_VALUE (ACTUAL_SYMBOL:HTTP_REQUEST))) (SEMANTIC_LINK (USAGE:RESPONSE_TYPE) (REPLACEMENT_VALUE (ACTUAL_SYMBOL:HTTP_RESPONSE))) (SEMANTIC_LINK (USAGE:CHANNEL) (REPLACEMENT_VALUE (ACTUAL_SYMBOL:HTTP_ASPECT))) (SEMANTIC_LINK (GOAL:REQUEST_HANDLER) (REPLACEMENT_VALUE (ACTUAL_PROCESS:httpresp))))");
spec_is_str_equal(t2s(sem_map),"(SEMANTIC_MAP (SEMANTIC_LINK (ROLE:REQUESTER) (REPLACEMENT_VALUE (ROLE:HTTP_CLIENT))) (SEMANTIC_LINK (ROLE:RESPONDER) (REPLACEMENT_VALUE (ROLE:HTTP_SERVER))) (SEMANTIC_LINK (USAGE:REQUEST_TYPE) (REPLACEMENT_VALUE (ACTUAL_SYMBOL:HTTP_REQUEST))) (SEMANTIC_LINK (USAGE:RESPONSE_TYPE) (REPLACEMENT_VALUE (ACTUAL_SYMBOL:HTTP_RESPONSE))) (SEMANTIC_LINK (USAGE:CHANNEL) (REPLACEMENT_VALUE (ACTUAL_SYMBOL:HTTP_ASPECT))) (SEMANTIC_LINK (GOAL:REQUEST_HANDLER) (REPLACEMENT_VALUE (ACTUAL_PROCESS:httpresp))))");
_t_free(sem_map);

VMHost *v = G_vm = _v_new();
Expand Down Expand Up @@ -393,7 +393,7 @@ void testHTTPprotocol() {
_o_express_role(er,PARSE_HTTP_REQUEST_FROM_LINE,HTTP_REQUEST_PARSER,HTTP_ASPECT,bindings);
_t_free(bindings);

//debug_enable(D_TRANSCODE+D_STEP+D_STREAM);
//debug_enable(D_TRANSCODE+D_STEP+D_REDUCE+D_STREAM);
_v_start_vmhost(G_vm);
sleep(1);
debug_disable(D_STREAM+D_SIGNALS+D_TREE+D_PROTOCOL);
Expand All @@ -418,7 +418,7 @@ void testHTTPprotocol() {

void *_httptester(void *arg) {
char *result = doSys("echo 'GET /path/to/file.ext HTTP/0.9' | nc localhost 8888");
spec_is_str_equal(result,"xxx");
spec_is_str_equal(result,"HTTP/1.1 200 OK\nContent-Type: text/ceptr\n\nsuper cept\n314159\n");
free(result);
G_done = true;
pthread_exit(NULL);
Expand All @@ -437,7 +437,6 @@ void testHTTPedgeReceptor() {
// instantiate it in the vmhost
Xaddr edge = _v_new_receptor(v,v->r,STREAM_EDGE,r);
// set up a socket listener that will transcode ascii to HTTP_REQUEST and send all the received requests to an HTTP aspect on the same receptor
// T *code = _t_parse(r->sem,0,"(CONVERSE (SCOPE (LISTEN (ASPECT_IDENT:HTTP_ASPECT) (CARRIER:LINES) (PATTERN (SEMTREX_SYMBOL_ANY)) (ACTION:echo2stream) (PARAMS (PARAM_REF:/2/1) (SLOT (USAGE:NULL_SYMBOL)))) (ITERATE (PARAMS) (STREAM_ALIVE (PARAM_REF:/2/1)) (SAY % (ASPECT_IDENT:HTTP_ASPECT) (CARRIER:backnforth) (STREAM_READ (PARAM_REF:/2/1) (RESULT_SYMBOL:HTTP_REQUEST)))) (STREAM_CLOSE (PARAM_REF:/2/1))) (BOOLEAN:1))",__r_make_addr(0,TO_ADDRESS,r->addr));
T *code = _t_parse(r->sem,0,"(CONVERSE (SCOPE (ITERATE (PARAMS) (STREAM_ALIVE (PARAM_REF:/2/1)) (INITIATE_PROTOCOL (PNAME:HTTP) (WHICH_INTERACTION:backnforth) (PROTOCOL_BINDINGS (RESOLUTION (WHICH_RECEPTOR (ROLE:HTTP_CLIENT) %)) (RESOLUTION (WHICH_RECEPTOR (ROLE:HTTP_SERVER) %)) (RESOLUTION (WHICH_PROCESS (GOAL:RESPONSE_HANDLER) (ACTUAL_PROCESS:echo2stream))) (RESOLUTION (WHICH_USAGE (USAGE:RESPONSE_HANDLER_PARAMETERS) (ACTUAL_VALUE (PARAM_REF:/2/1)))) (RESOLUTION (WHICH_VALUE (ACTUAL_SYMBOL:HTTP_REQUEST) (ACTUAL_VALUE (STREAM_READ (PARAM_REF:/2/1) (RESULT_SYMBOL:HTTP_REQUEST)))))) ) ) (STREAM_CLOSE (PARAM_REF:/2/1))) (BOOLEAN:1))",__r_make_addr(0,ACTUAL_RECEPTOR,r->addr),__r_make_addr(0,ACTUAL_RECEPTOR,r->addr));
// add an error handler that just completes the iteration
T *err_handler = _t_parse(r->sem,0,"(CONTINUE (POP_PATH (PARAM_REF:/4/1/1) (RESULT_SYMBOL:CONTINUE_LOCATION) (POP_COUNT:5)) (CONTINUE_VALUE (BOOLEAN:0)))");
Expand All @@ -459,7 +458,7 @@ void testHTTPedgeReceptor() {
_t_free(bindings);

// debug_enable(D_TRANSCODE+D_STEP+D_STREAM);
debug_enable(D_SIGNALS+D_STEP);
//debug_enable(D_SIGNALS+D_STEP);
_v_start_vmhost(G_vm);

G_done = false;
Expand All @@ -478,7 +477,7 @@ void testHTTPedgeReceptor() {
debug_disable(D_STREAM+D_SIGNALS+D_TREE+D_PROTOCOL);
debug_disable(D_TRANSCODE+D_REDUCE+D_REDUCEV+D_STEP);

spec_is_str_equal(t2s(r->flux),"");
//spec_is_str_equal(t2s(r->flux),"");

// cleanup vmhost instance
__r_kill(G_vm->r);
Expand Down
9 changes: 8 additions & 1 deletion src/base_defs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ Process: time_request,time_req_code,"request current time","response",SIGNATURE_
Context: STREAM_EDGE;

# process used by the stream edge receptor
Data: echo2stream_code,(STREAM_WRITE (PARAM_REF:/2/1) (PARAM_REF:/2/2));
Data: echo2stream_code,(STREAM_WRITE (PARAM_REF:/2/1) (TRANSCODE (TRANSCODE_PARAMS (TRANSCODE_TO:LINES)) (TRANSCODE_ITEMS (PARAM_REF:/2/2))));
Process: echo2stream,echo2stream_code,"echo input to stream","result",SIGNATURE_SYMBOL,NULL_SYMBOL,"stream",SIGNATURE_SYMBOL,EDGE_STREAM,"value",SIGNATURE_ANY,NULL_STRUCTURE;

# This doesn't work because the SLOT get's misinterpreted by __d_tsig see #127
Expand Down Expand Up @@ -836,6 +836,13 @@ Symbol: HTTP_HEADER,[|{HTTP_GENERAL_HEADER|HTTP_RESPONSE_HEADER|HTTP_ENTITY_HEAD
Symbol: HTTP_HEADERS,[*HTTP_HEADER];
Symbol: HTTP_RESPONSE,[(HTTP_RESPONSE_STATUS,HTTP_HEADERS,HTTP_RESPONSE_BODY)];

Data: http_response_status_2_ascii_str_proc, (CONTRACT_STR (RESULT_SYMBOL:ASCII_STR)
(TRANSCODE (TRANSCODE_PARAMS (TRANSCODE_TO:ASCII_STR)) (TRANSCODE_ITEMS (PARAM_REF:/2/1/1)))
(ASCII_CHAR:' ')
(TRANSCODE (TRANSCODE_PARAMS (TRANSCODE_TO:ASCII_STR)) (TRANSCODE_ITEMS (PARAM_REF:/2/1/2)))
);
ProcessL: http_response_status_2_ascii_str, http_response_status_2_ascii_str_proc,"http response status transcoder",HTTP_RESPONSE_STATUS,TRANSCODER,"output",SIGNATURE_SYMBOL,ASCII_STR,"input",SIGNATURE_SYMBOL,HTTP_RESPONSE_STATUS;

Data: http_response_2_lines_proc, (LINES
(CONTRACT_STR (RESULT_SYMBOL:LINE) (ASCII_STR:"HTTP") (ASCII_CHAR:'/') (ASCII_STR:"1.1 ") (TRANSCODE (TRANSCODE_PARAMS (TRANSCODE_TO:ASCII_STR)) (TRANSCODE_ITEMS (PARAM_REF:/2/1/1)) (ASCII_CHAR:' ') (PARAM_REF:/2/1/2)))
(DISSOLVE (TRANSCODE (TRANSCODE_PARAMS (TRANSCODE_TO:LINES)) (TRANSCODE_ITEMS (PARAM_REF:/2/1/2))))
Expand Down
5 changes: 4 additions & 1 deletion src/base_defs.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ SemanticID ZERO_OR_MORE_OF_HTTP_HEADER={0,0,0};
SemanticID HTTP_HEADERS={0,0,0};
SemanticID LIST_OF_HTTP_RESPONSE_STATUS_AND_HTTP_HEADERS_AND_HTTP_RESPONSE_BODY={0,0,0};
SemanticID HTTP_RESPONSE={0,0,0};
SemanticID http_response_status_2_ascii_str={0,0,0};
SemanticID http_response_2_lines={0,0,0};
SemanticID HTML_DOCUMENT={0,0,0};
SemanticID HTML_TOK_TAG_OPEN={0,0,0};
Expand Down Expand Up @@ -1276,7 +1277,7 @@ void base_defs(SemTable *sem) {
sY(CLOCK_CONTEXT,tell_time,INTERACTION);
sData(CLOCK_CONTEXT,time_req_code,STX_OP,SLOT,STX_OP,GOAL,RESPONSE_HANDLER,STX_CP,STX_OP,SLOT_CHILDREN,STX_OP,REQUEST,STX_OP,SLOT,STX_OP,ROLE,TIME_TELLER,STX_CP,STX_OP,SLOT_IS_VALUE_OF,TO_ADDRESS,STX_CP,STX_CP,STX_OP,ASPECT_IDENT,DEFAULT_ASPECT,STX_CP,STX_OP,CARRIER,tell_time,STX_CP,STX_OP,CLOCK_TELL_TIME,STX_CP,STX_OP,RESPONSE_CARRIER,tell_time,STX_CP,STX_CP,STX_CP,STX_CP);
sP(CLOCK_CONTEXT,time_request,time_req_code,"request current time","response",SIGNATURE_SYMBOL,TICK,0L);
sData(STREAM_EDGE_CONTEXT,echo2stream_code,STX_OP,STREAM_WRITE,STX_OP,PARAM_REF,2,1,TREE_PATH_TERMINATOR,STX_CP,STX_OP,PARAM_REF,2,2,TREE_PATH_TERMINATOR,STX_CP,STX_CP);
sData(STREAM_EDGE_CONTEXT,echo2stream_code,STX_OP,STREAM_WRITE,STX_OP,PARAM_REF,2,1,TREE_PATH_TERMINATOR,STX_CP,STX_OP,TRANSCODE,STX_OP,TRANSCODE_PARAMS,STX_OP,TRANSCODE_TO,LINES,STX_CP,STX_CP,STX_OP,TRANSCODE_ITEMS,STX_OP,PARAM_REF,2,2,TREE_PATH_TERMINATOR,STX_CP,STX_CP,STX_CP,STX_CP);
sP(STREAM_EDGE_CONTEXT,echo2stream,echo2stream_code,"echo input to stream","result",SIGNATURE_SYMBOL,NULL_SYMBOL,"stream",SIGNATURE_SYMBOL,EDGE_STREAM,"value",SIGNATURE_ANY,NULL_STRUCTURE,0L);
sY(INTERNET_CONTEXT,OCTET_STREAM,CSTRING);
sY(INTERNET_CONTEXT,PARAM_KEY,CSTRING);
Expand Down Expand Up @@ -1350,6 +1351,8 @@ void base_defs(SemTable *sem) {
sY(INTERNET_CONTEXT,HTTP_HEADERS,ZERO_OR_MORE_OF_HTTP_HEADER);
sTs(INTERNET_CONTEXT,LIST_OF_HTTP_RESPONSE_STATUS_AND_HTTP_HEADERS_AND_HTTP_RESPONSE_BODY,sT_SEQ(3,sT_SYM(HTTP_RESPONSE_STATUS),sT_SYM(HTTP_HEADERS),sT_SYM(HTTP_RESPONSE_BODY)));
sY(INTERNET_CONTEXT,HTTP_RESPONSE,LIST_OF_HTTP_RESPONSE_STATUS_AND_HTTP_HEADERS_AND_HTTP_RESPONSE_BODY);
sData(INTERNET_CONTEXT,http_response_status_2_ascii_str_proc,STX_OP,CONTRACT_STR,STX_OP,RESULT_SYMBOL,ASCII_STR,STX_CP,STX_OP,TRANSCODE,STX_OP,TRANSCODE_PARAMS,STX_OP,TRANSCODE_TO,ASCII_STR,STX_CP,STX_CP,STX_OP,TRANSCODE_ITEMS,STX_OP,PARAM_REF,2,1,1,TREE_PATH_TERMINATOR,STX_CP,STX_CP,STX_CP,STX_OP,ASCII_CHAR,' ',STX_CP,STX_OP,TRANSCODE,STX_OP,TRANSCODE_PARAMS,STX_OP,TRANSCODE_TO,ASCII_STR,STX_CP,STX_CP,STX_OP,TRANSCODE_ITEMS,STX_OP,PARAM_REF,2,1,2,TREE_PATH_TERMINATOR,STX_CP,STX_CP,STX_CP,STX_CP);
sPL(INTERNET_CONTEXT, http_response_status_2_ascii_str, http_response_status_2_ascii_str_proc,"http response status transcoder",HTTP_RESPONSE_STATUS,TRANSCODER,"output",SIGNATURE_SYMBOL,ASCII_STR,"input",SIGNATURE_SYMBOL,HTTP_RESPONSE_STATUS,0L);
sData(INTERNET_CONTEXT,http_response_2_lines_proc,STX_OP,LINES,STX_OP,CONTRACT_STR,STX_OP,RESULT_SYMBOL,LINE,STX_CP,STX_OP,ASCII_STR,"HTTP",STX_CP,STX_OP,ASCII_CHAR,'/',STX_CP,STX_OP,ASCII_STR,"1.1 ",STX_CP,STX_OP,TRANSCODE,STX_OP,TRANSCODE_PARAMS,STX_OP,TRANSCODE_TO,ASCII_STR,STX_CP,STX_CP,STX_OP,TRANSCODE_ITEMS,STX_OP,PARAM_REF,2,1,1,TREE_PATH_TERMINATOR,STX_CP,STX_CP,STX_OP,ASCII_CHAR,' ',STX_CP,STX_OP,PARAM_REF,2,1,2,TREE_PATH_TERMINATOR,STX_CP,STX_CP,STX_CP,STX_OP,DISSOLVE,STX_OP,TRANSCODE,STX_OP,TRANSCODE_PARAMS,STX_OP,TRANSCODE_TO,LINES,STX_CP,STX_CP,STX_OP,TRANSCODE_ITEMS,STX_OP,PARAM_REF,2,1,2,TREE_PATH_TERMINATOR,STX_CP,STX_CP,STX_CP,STX_CP,STX_OP,LINE,"",STX_CP,STX_OP,TRANSCODE,STX_OP,TRANSCODE_PARAMS,STX_OP,TRANSCODE_TO,LINE,STX_CP,STX_CP,STX_OP,TRANSCODE_ITEMS,STX_OP,PARAM_REF,2,1,3,TREE_PATH_TERMINATOR,STX_CP,STX_CP,STX_CP,STX_CP,STX_CP);
sPL(INTERNET_CONTEXT,http_response_2_lines,http_response_2_lines_proc,"http response transcoder",HTTP_RESPONSE,TRANSCODER,"output",SIGNATURE_SYMBOL,LINES,"input",SIGNATURE_SYMBOL,HTTP_RESPONSE,0L);
sY(INTERNET_CONTEXT,HTML_DOCUMENT,NULL_STRUCTURE);
Expand Down
2 changes: 2 additions & 0 deletions src/base_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,7 @@ enum INTERNETProcessIDs {
NULL_INTERNET_PROCESS_ID,
meda_type_2_ascii_str_ID,
content_type_2_line_ID,
http_response_status_2_ascii_str_ID,
http_response_2_lines_ID,
line_2_httpreq_ID,
ascii_chars_2_http_req_ID,
Expand All @@ -1509,6 +1510,7 @@ enum INTERNETProcessIDs {
};
SemanticID meda_type_2_ascii_str;
SemanticID content_type_2_line;
SemanticID http_response_status_2_ascii_str;
SemanticID http_response_2_lines;
SemanticID line_2_httpreq;
SemanticID ascii_chars_2_http_req;
Expand Down
3 changes: 3 additions & 0 deletions src/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Process _p_get_transcoder(SemTable *sem,Symbol src_sym,Symbol to_sym) {
if (semeq(src_s,DATE) && semeq(to_s,CSTRING)) {
return date2usshortdate;
}
if (semeq(HTTP_RESPONSE_STATUS,src_sym) && semeq(to_s,CSTRING)) {
return http_response_status_2_ascii_str;
}
}
return NULL_PROCESS;
}
Expand Down

0 comments on commit 602c66f

Please sign in to comment.