android - 在 Android 中获取 503 作为 Http 响应?

标签 android http-post varnish multipartentity

请检查我的 logcat。这是我在解析 http 响应时得到的结果。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
   <head>
      <title>503 Service Unavailable</title>
   </head>
   <body>
      <h1>Error 503 Service Unavailable</h1>
      <p>Service Unavailable</p>
      <h3>Guru Meditation:</h3>
      <p>XID: 1294992728</p>
      <hr>
      <p>Varnish cache server</p>
   </body>
</html>

我在将图像从 android 上传到服务器时收到此响应。有人可以帮我解决这个问题吗?

最佳答案

正如您所说的错误是来自服务器的 503,请检查 this link 一次。它声明503错误可能由于以下原因而发生:

  1. Obtain an IP address from the IP name of the site (the site URL without the leading 'http://'). This lookup (conversion of IP name to IP address) is provided by domain name servers (DNSs).
  2. Open an IP socket connection to that IP address.
  3. Write an HTTP data stream through that socket.
  4. Receive an HTTP data stream back from the Web server in response. This data stream contains status codes whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.

关于android - 在 Android 中获取 503 作为 Http 响应?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17335502/

相关文章:

java - Kotlin 在 PasswordTransformationMethod 中崩溃,而 Java 工作正常

android - 如何在时间选择器中将文本 “cancel”更改为android kotlin中的另一个文本?

asp.net - 为 POST Web API 使用可选的复杂类型操作参数

google-analytics - cloudControl 中的 Varnish 是否忽略了新的 Google Universal Analytics cookie ("_ga")?

magento 松节油推车侧边栏

apache - Varnish HTTP 503 - 后端生病 - apache 静态文件未缓存

c# - 统一 AdMob - ClassNotFound : com. google.unity.ads.UnityAdListener

android - 无法将 FFmpeg C 库移植到 android 中

c# - 通过 POST Multipart (HTTPRequest) 发送图像

Node.js - 简单的 Restify POST Mocha 测试失败