Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

cmd/vendor: ignore invalid XML after <meta> tag #643

Merged
merged 1 commit into from
Sep 26, 2016

Conversation

seh
Copy link
Contributor

@seh seh commented Sep 13, 2016

Addressing #642, port two changes from the upstream basis for the "vendor fetch" remote import path parser:

The first allows "vendor fetch" to accept a server response that matches the "go help importpath" documentation literally, providing solely a "meta" start tag as the entire document. More broadly, it accepts XML documents with improperly nested or even missing elements.

The latter allows "vendor fetch" to accept responses that contain invalid XML encountered after having read at least one "meta" start tag successfully, here the invalidity being due to violations other than element nesting.

Port two changes from the upstream basis for the "vendor fetch" remote
import path parser:

- Go change 14482
  cmd/go: use RawToken to parse remote package metadata
- Go change 18051
  cmd/go: ignore XML errors after Go <meta> tags

The first allows "vendor fetch" to accept a server response that matches
the "go help importpath" documentation literally, providing solely a
"meta" start tag as the entire document. More broadly, it accepts XML
documents with improperly nested or even missing elements.

The latter allows "vendor fetch" to accept responses that contain
invalid XML encountered after having read at least one "meta" start tag
successfully, here the invalidity being due to violations other than
element nesting.
@shawnzhu
Copy link

LGTM. and the verification failed on go 1.4.3 only

@seh
Copy link
Contributor Author

seh commented Sep 22, 2016

@davecheney, do you have any feedback on or concerns with this proposal?

@seh seh mentioned this pull request Sep 23, 2016
@davecheney
Copy link
Contributor

Sorry I let this drop. I changed jobs a few months ago and have had zero
spare time since then.

On Fri, Sep 23, 2016 at 12:49 AM, Steven E. Harris <[email protected]

wrote:

@davecheney https://github.com/davecheney, do you have any feedback on
or concerns with this proposal?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#643 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAcA5cQV5aromfxh3o83MpUBH9UkyEKks5qspVlgaJpZM4J8Aje
.

@davecheney
Copy link
Contributor

Thanks. I've fixed the integration test failure.

@davecheney davecheney merged commit 65d8604 into constabulary:master Sep 26, 2016
@seh seh deleted the accommodate-invalid-xml-meta branch September 26, 2016 12:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants