We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0dc250 commit 9284381Copy full SHA for 9284381
firebase-functions/src/main/java/com/google/firebase/functions/PublisherStream.kt
@@ -296,9 +296,8 @@ internal class PublisherStream(
296
private fun validateResponse(response: Response) {
297
if (response.isSuccessful) return
298
299
- val htmlContentType = "text/html; charset=utf-8"
300
val errorMessage: String
301
- if (response.code() == 404 && response.header("Content-Type") == htmlContentType) {
+ if (response.code() == 404 && MediaType.get(response.header("Content-Type")?: "").subtype() == "html") {
302
errorMessage = """URL not found. Raw response: ${response.body()?.string()}""".trimMargin()
303
notifyError(
304
FirebaseFunctionsException(
0 commit comments