Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • N Nomad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • 小 白蛋
  • Nomad
  • Repository
Switch branch/tag
  • nomad
  • api
  • api_test.go
Find file BlameHistoryPermalink
  • Michael Schurter's avatar
    Fix API panic and bad missing port check · 2b7e0914
    Michael Schurter authored Feb 20, 2017
    The format of the missing port error message changed from Go 1.7 to 1.8.
    The fix is to just use strings.Contains instead of strings.HasPrefix
    when looking for the "missing port" part.
    
    Also add an error return to Client.newRequest as parsing the path
    processes arbitrary user input and would panic if given an invalid URL.
    
    See: https://groups.google.com/d/topic/nomad-tool/gi3-CTE7oXo/discussion
    2b7e0914

免费DevSecOps平台,让您的项目体验完整的DevSecOps流程,让项目更安全