apache客户端http响应处理状态码http 100(apache client http response to handle status code http 100)
我使用apache httpdefault客户端并执行post函数,如下所示
HttpResponse imToken = httpClient.execute(httpPostIM);
得到的回应是
HTTP/1.1 100 Continue Connection: keep-alive
其次是:
HTTP/1.1 200 OK Date: Tue, 30 Aug 2011 19:11:35 GMT
我们如何从客户端处理这个问题?
I use apache httpdefault client and execute post function as below
HttpResponse imToken = httpClient.execute(httpPostIM);
the response obtained is
HTTP/1.1 100 Continue Connection: keep-alive
followed by:
HTTP/1.1 200 OK Date: Tue, 30 Aug 2011 19:11:35 GMT
How do we handle this from client side ??
原文:https://stackoverflow.com/questions/7249210
更新时间:2022-07-25 20:07
最满意答案
new ProcessBuilder("lsof", "-F", "n", "+D", "'/some/directory'") ^ ^
删除
/some/directory
周围的单引号。 它们被传递给lsof
程序并被解释为路径名的一部分。new ProcessBuilder("lsof", "-F", "n", "+D", "'/some/directory'") ^ ^
Remove the single quotes surrounding
/some/directory
. They are being passed through to thelsof
program and being interpreted as part of the pathname.
相关问答
更多-
因为在10.6上,1.5(在JavaVM框架中)符号链接到1.6。 OS X 10.6仅支持1.3和1.6; 1.4和1.5是符号链接1.6: $ ll /System/Library/Frameworks/JavaVM.framework/Versions/ total 64 lrwxr-xr-x 1 root wheel 5B May 19 12:17 1.3@ -> 1.3.1 drwxr-xr-x 3 root wheel 102B Dec 2 20:55 1.3.1/ lrw ...
-
在OS X 10.6中, open命令被增强,以允许将参数传递给应用程序: open ./AppName.app --args -AppCommandLineArg 但是,对于旧版本的Mac OS X,由于应用程序包不是设计为传递命令行参数,传统的机制是将Apple Events用于Cocoa应用程序或Carbon应用程序。 你也可以通过传递参数来使用环境变量来做某些事情。 In OS X 10.6, the open command was enhanced to allow passing of ar ...
-
你可以尝试xdg-open ,大多数Linux发行版都有它。 它将为您的文件打开默认关联的应用程序。 FYI https://portland.freedesktop.org/doc/xdg-open.html You could try xdg-open, most Linux distros have it. It will open default associated app for your file. FYI https://portland.freedesktop.org/doc/xdg-op ...
-
你不能阻止 shell缓存命令的位置; 这通常是出于性能原因而完成的。 但是,您可以强制shell按需刷新此缓存。 使用bash ,可以使用hash命令来操纵此命令缓存。 运行: hash mycommand 将导致shell更新mycommand的存储位置。 例如,如果我的$PATH从以下开始: $HOME/bin/A:$HOME/bin/B 我在$ HOME / bin / B中放置了一个名为mycommand的销售脚本: #!/bin/sh echo This is B. 然后运行我的mycom ...
-
循环中存在逻辑错误。 应该是这样的: String line = reader.readLine(); while (line != null) { System.out.println(line); line = reader.readLine(); } 虽然,Firefox总是应该在/ Applications中。 There is a logic error in your loop. It should be like: String line = reader.readLine( ...
-
听起来像gcc-4.2安装? 当安装程序查找gcc-4.0时,可能会链接此链接。 要检查gcc的位置,请执行 ls -l $(which gcc) 在我的系统上,这表明gcc是llvm-gcc-4.2的符号链接: lrwxr-xr-x 1 root wheel 12 Aug 13 2012 /usr/bin/gcc@ -> llvm-gcc-4.2 如果没有显示任何内容,请尝试: ls -l $(which gcc-4.2) 无论哪个显示输出,都将该语句准确地放入此命令中...... sudo ...
-
OS X命令行应用程序在从Java调用时找不到目录(OS X command line application cannot find directory while called from Java)[2023-11-06]
new ProcessBuilder("lsof", "-F", "n", "+D", "'/some/directory'") ^ ^ 删除/some/directory周围的单引号。 它们被传递给lsof程序并被解释为路径名的一部分。 new ProcessBuilder("lsof", "-F", "n", "+D", "'/some/directory'") ... -
首先,OSX上的默认编译器是clang而不是gcc所以最好使用clang 如果必须使用gcc ,可以通过编译选项-I option设置标题搜索路径( 例如: gcc -Ipath_to_headers yourprogram.c -o yourprogram ) First of all default compiler on OSX is clang instead of gcc So better to use clang If you have to use gccyou may set header ...
-
这只是Mac中链接框架的通用答案,它应该适用于OpenAL.framework % gcc -framework OpenAL -o test test.c 另见这篇旧的GCC文章 This is just a generic answer to link frameworks in the Mac, it should work for OpenAL.framework % gcc -framework OpenAL -o test test.c Also see this old GCC artic ...
-
使用launchagents mac os x在后台运行命令行应用程序(Running command line app in the background using launchagents mac os x)[2022-07-10]
我希望问题是open 。 如果直接调用/ Applications / Host ,它应该按预期工作。 但是,如果你需要-n param for open,请尝试通过使用-c参数调用/bin/bash来调用它,并将其余命令传递给bash并使用字符串。 I expect the problem is calling open. If you call /Applications/Host directly, it should work as expected. However, if you need th ...