]> git.lizzy.rs Git - plan9front.git/commitdiff
hget: -p should work the same as in old hget
authorstanley lieber <stanley.lieber@gmail.com>
Fri, 16 Mar 2012 17:58:01 +0000 (12:58 -0500)
committerstanley lieber <stanley.lieber@gmail.com>
Fri, 16 Mar 2012 17:58:01 +0000 (12:58 -0500)
rc/bin/hget

index a093e7a5cd85309ddff4ef8f3d508b7ee449b128..4569844367f2cfdb6ac76dc506f68602ff719855 100755 (executable)
@@ -51,8 +51,8 @@ if(! ~ $s 0)
                echo -n headers $i >[1=0]
        if(~ $#m 1)
                echo -n request $m >[1=0]
-       if(~ $#p 1)
-               cat <$p >$d/postbody
+       if(! ~ $#p 0)
+               echo $"p >$d/postbody
        <$d/body {
                if(~ $#o 1){
                        l=`{cat $d/contentlength >[2]/dev/null}