browserify / browserify/http-browserify
http browserify broken when sending a full node url object
- Langage dominant
- JavaScript
- Étoiles
- 245
- Forks
- 104
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
```
var url = {
host: "localhost:8081",
hostname: "localhost",
href: "http://localhost:8081/api/foo?bar=baz",
method: "GET",
path: "/api/foo?bar=baz",
pathname: "/api/foo",
port: "8081",
protocol: "http:",
query: "bar=baz",
search: "?bar=baz",
slashes: true
};
var request = http.get(url, noop);
```
```
expected: "http://localhost:8081/api/foo?bar=baz"
actual: "http://localhost:8081:8081/api/foo?bar=baz"
```
The url that is requested has the port in it 2 times. This is because of this line.
https://github.com/substack/http-browserify/blob/master/index.js#L7
I am finishing up a pull request to fix this where it will try host first, then hostname+port.
Please let me know if you have any input.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez à la ligne 7 de index.js, où l’URL de la requête est construite à partir du Node URL object fourni. Reproduisez l’exemple avec http.get et vérifiez que l’URL générée est http://localhost:8081/api/foo?bar=baz, avec le port inclus une seule fois.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- web-dev
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 48/100