http://pubsubhubbub.appspot.com/subscribe 407 需要身份验证
我有一个连接到 https://pubsubhubbub.appspot.com/subscribe 的订阅者客户端,我将参数放在下面
https://pubsubhubbub.appspot.com/subscribe
hub.topic http://...../lastupby
hub.callback http://localhost:8080/Subscription/subscription/subscribe
hub.mode subscribe
我也定义了代理设置,下面没有显示 但我采取 407 身份验证需要响应
HttpPost httppost = new HttpPost(hub);
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
nvps.add(new BasicNameValuePair("hub.callback", callbackUrl));
nvps.add(new BasicNameValuePair("hub.mode", "subscribe"));
nvps.add(new BasicNameValuePair("hub.topic", topic_url));
nvps.add(new BasicNameValuePair("hub.verify", "sync"));
if (lease_seconds != null)
nvps.add(new BasicNameValuePair("hub.lease_seconds", lease_seconds));
//For future https implementation
//if ((secret !=null) && (secret.getBytes("utf8").length < 200))
// nvps.add(new BasicNameValuePair("hub.hub.secret", secret));
if (verifytoken !=null)
nvps.add(new BasicNameValuePair("hub.verify_token", verifytoken));
webserver.addAction("subscribe",topic_url, verifytoken);
httppost.setEntity(new UrlEncodedFormEntity(nvps));
httppost.setHeader("Content-type", "application/x-www-form-urlencoded");
httppost.setHeader("User-agent", "RSS pubsubhubbub 0.3");
//create the thread and start it running
GetThread thread = new GetThread(httpClient, httppost);
thread.start();
thread.join();
有没有人知道这个问题 反正我还没解决 谢谢
I have a subscriber client that connects to https://pubsubhubbub.appspot.com/subscribe I put parameter below
https://pubsubhubbub.appspot.com/subscribe
hub.topic http://...../lastupby
hub.callback http://localhost:8080/Subscription/subscription/subscribe
hub.mode subscribe
i define proxy settings also,doesnot shown below
but i take 407 authentication required response
HttpPost httppost = new HttpPost(hub);
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
nvps.add(new BasicNameValuePair("hub.callback", callbackUrl));
nvps.add(new BasicNameValuePair("hub.mode", "subscribe"));
nvps.add(new BasicNameValuePair("hub.topic", topic_url));
nvps.add(new BasicNameValuePair("hub.verify", "sync"));
if (lease_seconds != null)
nvps.add(new BasicNameValuePair("hub.lease_seconds", lease_seconds));
//For future https implementation
//if ((secret !=null) && (secret.getBytes("utf8").length < 200))
// nvps.add(new BasicNameValuePair("hub.hub.secret", secret));
if (verifytoken !=null)
nvps.add(new BasicNameValuePair("hub.verify_token", verifytoken));
webserver.addAction("subscribe",topic_url, verifytoken);
httppost.setEntity(new UrlEncodedFormEntity(nvps));
httppost.setHeader("Content-type", "application/x-www-form-urlencoded");
httppost.setHeader("User-agent", "RSS pubsubhubbub 0.3");
//create the thread and start it running
GetThread thread = new GetThread(httpClient, httppost);
thread.start();
thread.join();
is there anyone know this problem
i havent solved yet anyway
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的回调是本地的,它将永远不会工作,因为集线器需要向其发送验证请求。回调 URL 中的
Localhost
意味着该 URL 是您的开发计算机的本地 URL,因此无法从网络的其余部分(包括集线器)访问:)If your callback is local, it will never work, as the hub needs to send it a verification request.
Localhost
in your callback url means that this url is local to your development machine, hence not accessible from the rest of the web, including the hub :)