The present invention provides a connection device for connecting a headgear having straps, a mask and a system for supplying a flow of gas to a patient. The connection device incorporates a locking member or locking portion which is configured to lock the straps in a particular location.