r/ProgrammerTIL • • Jun 18 '16

PHP [PHP] TIL cURL doesn't like protocol-relative URLs

Hissy fit:

//www.website.com 

Fine:

http://www.website.com

Also fine

https://www.website.com

Half a day spent on that one. Goddamn.

EDIT: So apparently this should be blindingly obvious and I'm an idiot for not knowing it. Coming from a largely self-taught web-dev background, so there's that. Go figure.

0 Upvotes

38 comments sorted by

View all comments

Show parent comments

-4

u/johnfn Jun 19 '16

Of all the things that could increase complexity, a simple check to see if a url starts with // doesn't seem like it'd be on the top of my list. In any case, you don't have to be rude to OP; he's just making a suggestion.

0

u/[deleted] Jun 19 '16

[deleted]

-4

u/johnfn Jun 19 '16

Imagine someone came up to you and said "I have this cool idea for a new feature for an app I use." and went on to explain it. Would you immediately reply with "That seems like a useless feature"?

I hope not. That kind of negativity off the bat is going to drive a lot of people away.

3

u/vote_me_down Jun 19 '16

Or it might encourage people to wait until they've learnt more than the absolute bare minimum before they start suggesting "features".

1

u/johnfn Jun 19 '16

Shooting down someone's idea immediately, when they are just starting to understand programming, will not encourage them to do more programming.

It only promotes the idea that programmers are hostile to outsiders, unfriendly, and generally not the kind of people you want to be around.

→ More replies (0)