Skip to content

Commit 17030fa

Browse files
committed
Don't treat '-d @' as a file
1 parent 1afb6e7 commit 17030fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unixhttp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func main() {
7171
method = "POST"
7272
}
7373
// If data begins with @, it references a file
74-
if (string(data[0]) == "@") {
74+
if (string(data[0]) == "@" && len(data) > 1) {
7575
if (string(data[1:]) == "-") {
7676
buf, err := ioutil.ReadAll(os.Stdin)
7777
if (err != nil) {

0 commit comments

Comments
 (0)