atom pollution #13

jclopes opened this Issue Sep 30, 2010 · 2 comments


None yet

2 participants

jclopes commented Sep 30, 2010

I noticed that ibrowse was polluting the virtualmachine with atoms when passed bogus URLs.
The functions ibrowse_lib:parse_url calls list_to_atom to get the URL protocol but if it's not a well formed URL it will pollute the node with useless atoms.

I see 2 possible solutions:

  1. keep the protocol as a string
  2. check if it's a supported protocol before the list_to_atom call ["http", "https"]

I suppose I could use list_to_existing_atom, but that is probably only supported in newer versions of Erlang/OTP. Thanks for the bug report. I'll try and come up with a solution.


Ok, I've decided that list_to_existing_atom is a safe thing to do. This will be part of the next release of ibrowse.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment