gpt4 book ai didi

cmd - windows CMD 在双引号内发送 CRLF

转载 作者:行者123 更新时间:2023-12-04 23:03:20 28 4
gpt4 key购买 nike

我想为 ffplay 或 ffmpeg 传递多个标题,它说我需要用 CRLF 拆分。在 linux 上我可以使用 \$'\r\n'但是 window 怎么样?

SET CRLF=^
ffplay -v debug -i "http://example.com/test" -headers "Accept-Language: en-US,en;q=0.5%CRLF%Connection: keep-alive"

调试日志: Connection: keep-alive未发送
[http @ 04df3f40] No trailing CRLF found in HTTP header.
[http @ 04df3f40] request: GET /test HTTP/1.1 0KB sq= 0B f=0/0
User-Agent: Lavf/57.37.101
Accept: */*
Range: bytes=0-
Connection: close
Host: example.com
Icy-MetaData: 1
Accept-Language: en-US,en;q=0.5

谢谢

最佳答案

请尝试以这种方式设置 CRLF。它可能会起作用。

C:\Users\pwatson>type t.bat
@echo off
setlocal enabledelayedexpansion

REM === The following line -MUST- be followed by two (2) blank lines.
SET CRLF=^


REM === DO NOT EDIT THE PREVIOUS TWO (2) LINES

echo this is a!CRLF!new line

然后,运行它。
C:\Users\pwatson>call t.bat
this is a
new line

关于cmd - windows CMD 在双引号内发送 CRLF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37800218/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com