sunsonzh

Results 4 comments of sunsonzh

服务端是支持HEAD请求的,虽然content-length 返回的是0,但不应该报错,而且我有尝试去掉 HEAD功能,一样下载失败 ![image](https://github.com/ithewei/libhv/assets/6812003/ee90849a-9cbf-4791-a4ed-9c6f3a668793) 我后面是用requests::downloadFile代替HttpClient, 可以正常下载文件 cmake编译我不知道HV_STATIC_LIB这个宏应该加在哪里, 我看CMakeLists.txt文件里面应该是已经定义了HV_STATICLIB这个宏参数的,这个参数不起作用吗?

![image](https://github.com/ithewei/libhv/assets/6812003/3ecc9eab-7462-40de-95bc-7b57e5d1473e) 我这里加了 HV_STATIC_LIB 宏,用静态库还是无法编译,动态库就能正常编译

添加宏HV_STATICLIB,静态库调用可以了 但是下载还是有问题,这是我写的代码,wget函数,可以从samples里面复制过来的 ![image](https://github.com/ithewei/libhv/assets/6812003/0e4da827-0fcb-434b-8ffa-3ab10d9fc1cd) ![image](https://github.com/ithewei/libhv/assets/6812003/cbd3574d-715c-44f0-89f0-be6cdc682df8) ![image](https://github.com/ithewei/libhv/assets/6812003/3780a08b-c7b9-4942-94c9-ef02c4f7c700)

跟踪调试之后,现在可以了,是我在移除HEAD功能代码时,漏掉了给 req.url赋值, 感谢@ithewei 耐心的指点!