Skip to content

Commit cf5d2cd

Browse files
Set status string + fix format string in WS example (CI...)
1 parent 65a5028 commit cf5d2cd

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ FLAMBORP="asdf"
2727
YMO_BOX([Init])
2828
# NOTE: This is the PACKAGE version (SemVer), NOT the ABI version (libtool):
2929
AC_INIT(
30-
[libyimmo], [0.0.1],
30+
[libyimmo], [0.0.2],
3131
[andrew.canaday@gmail.com],[libyimmo],
3232
[https://github.com/andrew-canaday/libyimmo])
3333
AC_CONFIG_AUX_DIR([./build-aux])
@@ -82,7 +82,7 @@ AC_SUBST([PACKAGE_SUMMARY],["Lightweight socket server framework"])
8282
# - https://autotools.io/libtool/version.html
8383
AC_SUBST([YMO_ABI_CURRENT],[0],[Yimmo libtool ABI current])
8484
AC_SUBST([YMO_ABI_AGE],[0],[Yimmo libtool ABI age])
85-
AC_SUBST([YMO_ABI_REVISION],[1],[Yimmo libtool ABI revision])
85+
AC_SUBST([YMO_ABI_REVISION],[2],[Yimmo libtool ABI revision])
8686
AC_SUBST([YMO_LIB_VERSION],["$YMO_ABI_CURRENT:$YMO_ABI_REVISION:$YMO_ABI_AGE"])
8787

8888
## Package Version:

example/ws_example.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static ymo_status_t test_ws_recv_cb(
124124
size_t len)
125125
{
126126
if( data && len ) {
127-
ymo_log_info("Recv from %p: \"%*s\"",
127+
ymo_log_info("Recv from %p: \"%.*s\"",
128128
(int)len, data, (void*)session);
129129
return ymo_ws_session_send(
130130
session, flags, YMO_BUCKET_FROM_CPY(data, len));
@@ -181,6 +181,7 @@ static ymo_status_t test_http_callback(
181181
{
182182
ymo_http_response_set_header(response, "content-type", "text/plain");
183183
ymo_bucket_t* content = YMO_BUCKET_FROM_REF("OK", 2);
184+
ymo_http_response_set_status_str(response, "200 OK");
184185
ymo_http_response_body_append(response, content);
185186
ymo_http_response_finish(response);
186187
return YMO_OKAY;

wsgi/ymo_wsgi_worker.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ static ymo_status_t ymo_wsgi_worker_issue_request(
212212

213213
ymo_bucket_t* body_item = NULL;
214214
PyObject* item;
215+
/* TODO: I think this has to be removed for services that might do
216+
* HTTP-based long-polling. Better to check to see if the
217+
* object provides a "len" method and check that. Else, abide
218+
* by the spec.
219+
*/
215220
while((item = PyIter_Next(r_val))) {
216221
/* So, here's the deal: the WSGI spec essentially says "any kind
217222
* of buffering is immoral; if you have it, send it," which is

0 commit comments

Comments
 (0)