Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty feed #9

Closed
michaelnisi opened this issue Mar 25, 2019 · 8 comments
Closed

Empty feed #9

michaelnisi opened this issue Mar 25, 2019 · 8 comments

Comments

@michaelnisi
Copy link
Owner

michaelnisi commented Mar 25, 2019

Found a problematic feed, https://feuer-und-brot.podigee.io/feed/mp3. Parsing seems fine, but HTTP API responds empty.

HEAD says:

% curl -I https://feuer-und-brot.podigee.io/feed/mp3                          
HTTP/2 200
server: openresty
date: Mon, 25 Mar 2019 06:03:15 GMT
content-type: application/rss+xml; charset=utf-8
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
etag: W/"31b9ae56a6d5802769843d28e66da93d"
last-modified: Fri, 15 Mar 2019 16:06:03 GMT
cache-control: max-age=60, public, must-revalidate
vary: Origin,Accept-Encoding
x-request-id: 6395a91e-6956-4da1-8aa8-8b61e4e970b7
x-runtime: 0.099599
strict-transport-security: max-age=15552000; includeSubDomains
x-proxy-cache: HIT
@michaelnisi
Copy link
Owner Author

Gathered more information about this.

WARN: manger/19091 on ed1cc06f-840c-cfee-ec3d-d53b552aef4f: /entries/https%3A%2F%2Ffeuer-und-brot.podigee.io%2Ffeed%2Fmp3: Error: parse error: undefined:1:0: document must contain a root element.: parsing: https://feuer-und-brot.podigee.io/feed/mp3
    Error: /entries/https%3A%2F%2Ffeuer-und-brot.podigee.io%2Ffeed%2Fmp3: Error: parse error: undefined:1:0: document must contain a root element.: parsing: https://feuer-und-brot.podigee.io/feed/mp3
        at Entries.onerror (/opt/podest/manger/lib/routes.js:135:11)
        at emitOne (events.js:121:20)
        at Entries.emit (events.js:211:7)
        at Pickup.onError (/opt/podest/manger/node_modules/manger/lib/streams_base.js:663:12)
        at emitOne (events.js:116:13)
        at Pickup.emit (events.js:211:7)
        at SaxesParser.Pickup.parser.onerror (/opt/podest/manger/node_modules/pickup/index.js:198:10)
        at SaxesParser.fail (/opt/podest/manger/node_modules/saxes/lib/saxes.js:487:10)
        at SaxesParser.end (/opt/podest/manger/node_modules/saxes/lib/saxes.js:1598:12)
        at SaxesParser.write (/opt/podest/manger/node_modules/saxes/lib/saxes.js:542:23)
# cat package.json
{
  "name": "manger-http",
  "version": "3.3.2",
  "description": "HTTP/1.1 API for caching RSS feeds",
  "main": "index.js",
  "scripts": {
    "pretest": "standard",
    "test": "tap test/*.js --cov",
    "posttest": "rm -rf /tmp/manger-http-[1-9]*",
    "start": "MANGER_LOG_LEVEL=30 node start.js | node_modules/bunyan/bin/bunyan -o short"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/michaelnisi/manger-http"
  },
  "keywords": [
    "feed",
    "cache",
    "http",
    "server"
  ],
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/michaelnisi/manger-http/issues"
  },
  "homepage": "https://github.com/michaelnisi/manger-http",
  "directories": {
    "test": "test"
  },
  "dependencies": {
    "bunyan": "^1.8.12",
    "etag": "^1.8.1",
    "http-hash": "^2.0.0",
    "http-methods": "^1.0.0",
    "manger": "^6.4.4",
    "mkdirp": "^0.5.1",
    "negotiator": "^0.6.1"
  },
  "devDependencies": {
    "rimraf": "^2.5.4",
    "standard": "^11.0.1",
    "tap": "^12.5.3"
  },
  "engines": {
    "node": ">=6"
  },
  "author": "Michael Nisi (https://troubled.pro/)"
}
# npm version
{ 'manger-http': '3.3.2',
  npm: '5.6.0',
  ares: '1.10.1-DEV',
  cldr: '32.0.1',
  http_parser: '2.7.0',
  icu: '60.2',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.10.0',
  openssl: '1.0.2o',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.50',
  zlib: '1.2.11' }

@michaelnisi
Copy link
Owner Author

A quick look into dependencies points to Saxes, a working local system has saxes@3.1.6 and the problematic production system has saxes@3.1.9.

@michaelnisi
Copy link
Owner Author

Nope, too simple.

@michaelnisi michaelnisi pinned this issue Mar 26, 2019
@michaelnisi
Copy link
Owner Author

michaelnisi commented Mar 26, 2019

Why would this system have an issue with this specific feed?

@michaelnisi
Copy link
Owner Author

Node doesn’t like it if no content length is provided.

@michaelnisi
Copy link
Owner Author

The fix, checking response.complete, will be in the next release later today.

@michaelnisi michaelnisi unpinned this issue Mar 28, 2019
@michaelnisi
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant