[Chilli] change in wwwsh
Beebe, Matthew
matthew.beebe at hei-ss.com
Mon Sep 23 18:10:01 UTC 2013
Hello all:
r476 (sep 2012) of coova-chilli introduced a change in wwwsh:
What previously had been this:
dd of=$POST_FILE count=$CONTENT_LENGTH bs=1 2>/dev/null
Became this:
dd of=$POST_FILE cbs=$CONTENT_LENGTH conv=block count=1 2>/dev/null
ie:
===================================================================
--- wwwsh(revision 475)
+++ wwwsh(revision 485)
@@ -24,7 +24,7 @@
if [ ${CONTENT_LENGTH:-0} -gt 0 ]; then
POST_FILE=/tmp/post.$$
export POST_FILE
- dd of=$POST_FILE count=$CONTENT_LENGTH bs=1 2>/dev/null
+ dd of=$POST_FILE cbs=$CONTENT_LENGTH conv=block count=1 2>/dev/null
$haserl $file < $POST_FILE
/bin/rm -f $POST_FILE
else
This was apparently related to a change proposed back in Jan 2011 to assist with Content-Length responses sent from some browsers. (see: http://coova.org/node/4640) (though I'm not certain that was the reason, but it was the same change as proposed)
However, the "cbs=" and "conv=block" are parameters not supported by the dd program included in most embedded systems (ie: the standard busybox binary doesn't handle those parameters)
While I _WAS_ smart enough to track this down as the source of my problems, and _WAS_ smart enough to search through the svn commits to find where/when the change was introduced, I'm apparently not smart enough to understand what it is doing... :)
If I change it to the prior way, my immediate problem goes away, but I must confess I don't fully understand what this change was fixing, so I can't be certain I'm not breaking something important.
I'd also like to take a stab at re-factoring it in a way that is more broadly supported, but am a little lost on what it is trying to accomplish. Any thoughts/comments are appreciated.
Thanks.
-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.coova.org/pipermail/chilli/attachments/20130923/59fa58bd/attachment.html>
More information about the Chilli
mailing list