Giter Site home page Giter Site logo

feign's People

Contributors

abhijitsarkar avatar asarkar avatar

Watchers

 avatar  avatar

feign's Issues

Invalid headers fail the mapping

Expected:

If individual values are invalid in the YAML config file, those are discarded, preferably with warning logs, but the rest of the mapping is not affected.

Actual:

Invalid header values (not surrounded by quotes) cause the whole mapping to be discarded.

responses:
  -
  status: 200
  headers:
    pairs:
      cache-control: no-cache
      content-type: application/json; charset=utf-8
      expires: -1
      pragma: no-cache
      server: Microsoft-IIS/8.0
      set-cookie: ARRAffinity=6989538395f4f4ee1b5bb8ed95fdab337b34596b6ab0bae1291e54c6253d7510;Path=/;Domain=sandboxdaivb.azurewebsites.net
      x-aspnet-version: 4.0.30319
      x-powered-by: ASP.NET

Content type set two different ways

Warning in log:

2016-12-15 01:03:26.785 [WARN ] p.c.s.n.NettyModelConversion.apply - Content-Type set both in header (application/json; charset=utf-8) and attached to entity (application/json), ignoring content type from entity. To remove this warning, use Result.as(...) to set the content type, rather than setting the header manually.

Recorded request:

{
	"request": {
		"path": "/header",
		"method": "POST",
		"queries": {
			"location": ["seattle"]
		},
		"headers": {
			"X-Passthrough-Xxx": "xxx",
			"Connection": "keep-alive",
			"Content-Length": "16",
			"Accept": "application/json",
			"Content-Type": "application/json",
			"Accept-Charset": "UTF-8",
			"Accept-Language": "zh",
			"Accept-Encoding": "identity",
			"User-Agent": "Java/1.8.0_66",
			"Host": "localhost:9000"
		}
	},
	"id": "header-1836696444"
}

Feign mapping:

responses:
  -
  status: 200
  headers:
    pairs:
      cache-control: 'no-cache'
      content-type: 'application/json; charset=utf-8'
      expires: '-1'
      pragma: 'no-cache'
      server: 'Microsoft-IIS/8.0'
      set-cookie: 'ARRAffinity=6989538395f4f4ee1b5bb8ed95fdab337b34596b6ab0bae1291e54c6253d7510;Path=/;Domain=sandboxdaivb.azurewebsites.net'
      x-aspnet-version: '4.0.30319'
      x-powered-by: 'ASP.NET'
  body:
    raw: '{ "ContentUrl": "http://dummycontentprovider.com/getContent" }'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.